问候,我正在使用Firebase消息发送通知到flutter应用程序,它工作正常,但是通知作为状态栏中的应用程序图标接收,并且像任何常规应用程序一样弹出通知栏。这是代码:
_firebaseMessaging.configure(
onMessage: (Map<String, dynamic> notification) async {
setState(() {
notifications.add(
Notifications(
title: notification["notification"]["title"],
body: notification["notification"]["body"],
color: Colors.red,
),
);
});
},
onLaunch: (Map<String, dynamic> notification) async {
setState(() {
notifications.add(
Notifications(
title: notification["notification"]["title"],
body: notification["notification"]["body"],
color: Colors.green,
),
);
});
},
onResume: (Map<String, dynamic> notification) async {
setState(() {
notifications.add(
Notifications(
title: notification["notification"]["title"],
body: notification["notification"]["body"],
color: Colors.blue,
),
);
});
},
);
这样做是手动设置还是什么?