【发布时间】:2020-08-02 02:52:23
【问题描述】:
应用打开时的onSelectNotification
Future<void> onSelectNotification(String payload) async {
Category category = Category();
category.id = notification.idNew;
category.email = notification.mainphoto;
category.since = notification.since;
category.name = notification.title;
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FourthRoute(
category: category,
)));
}
当打开并点击通知时,它会转到FourthRoute
但是当它关闭时它只是打开应用程序导航器不工作
ios 和 android 的问题
我想在 onSelectNotification 中使用 SharedPreferences 来保存密钥 稍后再检查
但我读到应用程序关闭时飞镖不工作
【问题讨论】:
标签: flutter notifications localnotification