onDidReceiveLocalNotificationIos method
Implementation
void onDidReceiveLocalNotificationIos(int id, String? title, String? body, String? payload) async
{
// display a dialog with the notification details, tap ok to go to another page
logCat( 'NotificationController: IN onDidReceiveLocalNotification Ios' );
logCat('NotificationController: id: $id / $title / $body / $payload');
showDialog(
context: Get.context!,
builder: (BuildContext context) => CupertinoAlertDialog(
title: Text(title??''),
content: Text(body??''),
actions: [
CupertinoDialogAction(
isDefaultAction: true,
child: Text('Ok'),
onPressed: () async {
Navigator.of(context, rootNavigator: true).pop();
},
)
],
),
);
}