onActionReceivedMethod static method
- ReceivedAction receivedAction
Use this method to detect when the user taps on a notification or action button
Implementation
@pragma("vm:entry-point")
static Future<void> onActionReceivedMethod(
ReceivedAction receivedAction) async {
// Your code goes here
// Navigate into pages, avoiding to open the notification details page over another details page already opened
MyApp.navigatorKey.currentState
?.pushNamed /*AndRemoveUntil*/ ('/default-notification-page',
// (route) =>
// (route.settings.name != '/default-notification-page') ||
// route.isFirst,
arguments: receivedAction);
}