onDidReceiveNotificationResponse function

void onDidReceiveNotificationResponse(
  1. NotificationResponse response
)

Callback method called when a notification is clicked in the operating system.

Implementation

@pragma('vm:entry-point')
void onDidReceiveNotificationResponse(NotificationResponse response) {
  String? payload = response.payload;
  debug('NotificationManager - callback on notification, payload: $payload');

  if (payload != null) {
    AppTaskController().onNotification(payload);
  } else {
    warning(
      "NotificationManager - Error in callback from notification - payload is '$payload'",
    );
  }
}