onDidReceiveNotificationResponse method

void onDidReceiveNotificationResponse(
  1. NotificationResponse notificationResponse
)

Implementation

void onDidReceiveNotificationResponse(
    NotificationResponse notificationResponse) {
  final payload = notificationResponse.payload;

  pushInteractionEvent(payload, 'CLICK');

  if (callback != null) {
    // Call the callback function if it is not null
    final decodedPayload = jsonDecode(payload!);
    callback!(decodedPayload);
  }
}