小编vpx*_*oxo的帖子

Flutter - 允许用户输入主题标签

你好,Flutter 新手!我想让我的用户输入一些链接到该条目的主题标签,这些标签将进入 Firestore。

对于主题标签,我将其设置为列表,但我不确定如何让用户创建主题标签?基本上类似于 SO 中的标签字段提出问题。 stackoverflow 主题标签 在 Firestore 上,我已将该字段设置为一个数组来接收数据。

我找不到太多关于在 flutter 上创建主题标签的文档。任何帮助,将不胜感激!!:) 提前致谢!

hashtag flutter

4
推荐指数
1
解决办法
3292
查看次数

Flutter 本地通知不适用于 iOS

你好颤振新手在这里!我正在使用颤振本地通知并将默认代码添加到我的应用程序中。它适用于Android,但不适用于iOS。知道为什么吗?

我尝试了 iPhone 8 和 iPhone 11 的 iOS 模拟器。它适用于我的 Pixel 3 API 29 android 模拟器。

我还为此应用程序启用了 iOS 中的通知(设置>此应用程序>通知)并授予权限。

对于 Android,我在 AndroidManifest.xml 中添加了权限请求。

import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';


class AppNotification extends StatefulWidget {
  static const String id = 'app_notification';

  @override
  _AppNotificationState createState() => _AppNotificationState();
}

class _AppNotificationState extends State<AppNotification> {
  FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;

  @override
  void initState() {
    super.initState();
    flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
    var android = AndroidInitializationSettings('app_icon');
    var iOS = IOSInitializationSettings();
    var initSettings = InitializationSettings(android, iOS);

    flutterLocalNotificationsPlugin.initialize(initSettings,
        onSelectNotification: onSelectNotification);
  }

  Future onSelectNotification(String payload) async …
Run Code Online (Sandbox Code Playgroud)

notifications flutter

3
推荐指数
1
解决办法
5345
查看次数

标签 统计

flutter ×2

hashtag ×1

notifications ×1