onDidReceiveLocalNotification method

void onDidReceiveLocalNotification(
  1. int id,
  2. String? title,
  3. String? body,
  4. String? payload,
)

Implementation

void onDidReceiveLocalNotification(
    int id, String? title, String? body, String? payload) {
  // For iOS 10 or lower, this callback will not be triggered when app is in background or terminated.
  pushInteractionEvent(payload, 'CLICK');

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