firebaseMessagingBackgroundHandler function
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());
}
}
}