我的代码如下。它在 Android 设备上运行良好,但是当我单击通知时,它不会在 IOS 上打开特定屏幕。它只是打开应用程序。我希望它打开特定的屏幕。
Future<void> initSettings() async {
var initAndorid = AndroidInitializationSettings('my_logo');
var initIOS = IOSInitializationSettings(
requestSoundPermission: false,
requestBadgePermission: false,
requestAlertPermission: false,
);
var initSetting =InitializationSettings(android: initAndorid, iOS: initIOS);
notificationsPlugin = new FlutterLocalNotificationsPlugin();
await notificationsPlugin.initialize(initSetting,
onSelectNotification: notificationSelected);
}
Future notificationSelected(String? payload) async {
await Navigator.push(
context,
MaterialPageRoute(builder: (context) => SpesificScreen())
);
}
它适用于 Android 设备。我应该怎么办?提前致谢...