NotificationActionCallback typedef

NotificationActionCallback = Future<void> Function(String? route, Map<String, dynamic>? data)

Callback type for handling notification taps.

Called when user taps a notification from any app state (foreground, background, terminated).

  • route: The route to navigate to (extracted from notification data)
  • data: Additional data from the notification

Implementation

typedef NotificationActionCallback = Future<void> Function(
  String? route,
  Map<String, dynamic>? data,
);