registerNotificationLifecycleCallbacks static method

Future<void> registerNotificationLifecycleCallbacks({
  1. dynamic onPushSDKDidReceiveNotification(
    1. PNNotification
    )?,
  2. bool onPushSDKDidReceiveNotificationDestination(
    1. String,
    2. PNNotificationInteraction
    )?,
})

Implementation

static Future<void> registerNotificationLifecycleCallbacks({
  Function(PNNotification)? onPushSDKDidReceiveNotification,
  bool Function(String, PNNotificationInteraction)?
      onPushSDKDidReceiveNotificationDestination,
}) {
  if (onPushSDKDidReceiveNotification != null) {
    _onPushSDKDidReceiveNotification = onPushSDKDidReceiveNotification;
  }
  if (onPushSDKDidReceiveNotificationDestination != null) {
    _onPushSDKDidReceiveNotificationDestination =
        onPushSDKDidReceiveNotificationDestination;
  }
  return sdk._defaultChannel
      .invokeMethod("registerNotificationLifecycleCallbacks");
}