From 241f9421e688de170cafed9101c3512bd284469d Mon Sep 17 00:00:00 2001 From: evgeny Date: Fri, 26 Jul 2024 13:30:38 +0100 Subject: [PATCH] fix: serialization for push notification made `title` optional according to [FCM docs](https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/RemoteMessage.Notification) --- lib/src/push_notifications/src/notification.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/push_notifications/src/notification.dart b/lib/src/push_notifications/src/notification.dart index cc4a957b3..cfe0acfb2 100644 --- a/lib/src/push_notifications/src/notification.dart +++ b/lib/src/push_notifications/src/notification.dart @@ -26,6 +26,6 @@ class Notification { /// Creates an instance from the map. factory Notification.fromMap(Map map) => Notification( body: map[TxNotification.body] as String?, - title: map[TxNotification.title] as String, + title: map[TxNotification.title] as String? ?? '', ); }