I am using awesome notification
While my app in foreground or background i have received two notification , One is Awesome notification and second is firebase default notification
While on checking if i remove notification object from payload IOS will not receive notification. How we can handle this
This is my code
Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
if (message.data['type'] != null) {
await AwesomeNotifications().createNotification(
content: NotificationContent(
id: DateTime.now().millisecondsSinceEpoch.remainder(100000),
channelKey: 'isn',
title: "${message.notification?.title}",
body: "${message.notification?.body} ",
category: NotificationCategory.Message,
duration: const Duration(seconds: 5),
autoDismissible: true,
backgroundColor: ColorConstant.lightGreyColor,
),
);
}
}
This is my OutPut On android side
I am using awesome notification While my app in foreground or background i have received two notification , One is Awesome notification and second is firebase default notification While on checking if i remove notification object from payload IOS will not receive notification. How we can handle this This is my code Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
if (message.data['type'] != null) {
await AwesomeNotifications().createNotification(
content: NotificationContent(
id: DateTime.now().millisecondsSinceEpoch.remainder(100000),
channelKey: 'isn',
title: "${message.notification?.title}",
body: "${message.notification?.body} ",
category: NotificationCategory.Message,
duration: const Duration(seconds: 5),
autoDismissible: true,
backgroundColor: ColorConstant.lightGreyColor,
),
);
}
}
This is my OutPut On android side