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('NotificationController - callback on notification, payload: $payload');

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