Skip to content

Commit 7956a6d

Browse files
authored
Merge pull request #2102 from morebytes/fix_free_food_prod_bug_patch
Fix free food PROD bug
2 parents 7676a1d + 83c687a commit 7956a6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/core/models/notifications.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class Audience {
7272
}
7373

7474
class Message {
75+
7576
String message;
7677
String title;
7778
Data data;
@@ -83,8 +84,9 @@ class Message {
8384
});
8485

8586
Message.fromJson(Map<String, dynamic> json)
86-
: message = json["message"],
87-
title = json["title"],
87+
// Defaulting to empty strings until we figure out what should or should not be null on the backend
88+
: message = json["message"] ?? "",
89+
title = json["title"] ?? "",
8890
data = Data.fromJson(json["data"]);
8991

9092
Map<String, dynamic> toJson() => {

0 commit comments

Comments
 (0)