From 2734d174219c39c7e4bc575f2f990e1d3862a952 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Mon, 19 Feb 2024 17:38:39 +0300 Subject: [PATCH] improvement --- .../notification/firebase_notification_manger.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/controllers/notification/firebase_notification_manger.dart b/lib/controllers/notification/firebase_notification_manger.dart index 19f4788..39c6aa2 100644 --- a/lib/controllers/notification/firebase_notification_manger.dart +++ b/lib/controllers/notification/firebase_notification_manger.dart @@ -104,8 +104,11 @@ class FirebaseNotificationManger { }); FirebaseMessaging.onMessage.listen((RemoteMessage message) { - NotificationManger.showNotification( - title: message.notification.title, subtext: message.notification.body, hashcode: int.tryParse("1234" ?? "") ?? 1, payload: json.encode(message.data), context: context); + if (Platform.isAndroid) { + NotificationManger.showNotification( + title: message.notification.title, subtext: message.notification.body, hashcode: int.tryParse("1234" ?? "") ?? 1, payload: json.encode(message.data), context: context); + } + return; }); FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {