onDidReceiveBackgroundNotificationResponse static method

void onDidReceiveBackgroundNotificationResponse(
  1. NotificationResponse response
)

Implementation

@pragma('vm:entry-point')
static void onDidReceiveBackgroundNotificationResponse(NotificationResponse response) {
  debugPrint('Background notification tapped: ${response.payload}');

  if (response.payload == null || (response.payload?.isEmpty ?? true)) {
    return;
  }

  handleNotificationTap?.call(jsonDecode(makeValidJson(response.payload ?? "")));
}