onActionReceivedMethod static method

Future<void> onActionReceivedMethod(
  1. 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 {
  // Debugging-Ausgabe zur Nachverfolgung
  debugPrint(
      'Notification Action received: ID=${receivedAction.id}, Channel=${receivedAction.channelKey}, Button=${receivedAction.buttonKeyPressed}');

  // Zur DefaultNotificationPage navigieren
  MyApp.navigatorKey.currentState
      ?.pushNamed('/default-notification-page', arguments: receivedAction);
}