【发布时间】:2021-06-20 22:39:21
【问题描述】:
我正在开发一个需要回复通知的应用。我可以在收到通知时显示按钮。但是,我无法将任何方法绑定到它。这是我的代码:
Future<void> firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Firebase.initializeApp();
AwesomeNotifications().createNotification(
content: NotificationContent(
id: 10,
channelKey: 'basic_channel',
title: 'Simple Notification',
body: 'Simple body'),
actionButtons: [
NotificationActionButton(
label: 'TEST',
enabled: true,
buttonType: ActionButtonType.Default,
key: 'test',
)
]);
print("Background message service");
}
感谢您的帮助!
【问题讨论】:
-
有什么解决办法吗?
标签: flutter firebase-notifications flutter-notification