firebaseMessagingBackgroundHandler function

Future<void> firebaseMessagingBackgroundHandler(
  1. RemoteMessage? message
)

Implementation

Future<void> firebaseMessagingBackgroundHandler(RemoteMessage? message) async {
  await Firebase.initializeApp();
  NotificationServices notificationServices = NotificationServices();

  if (message != null) {
    await notificationServices.showNotification(message);
    if (kDebugMode) {
      print("background");
      print(message.notification?.title.toString());
    }
  }
}