forked from eatvio/eatvio_app
added date parsing for reminder
This commit is contained in:
@@ -106,12 +106,16 @@ class DiaryReminderNotification implements BaseNotificationModel {
|
||||
final NotificationType type;
|
||||
@override
|
||||
final bool isRead;
|
||||
|
||||
|
||||
DiaryReminderNotification({required this.type, required this.isRead});
|
||||
final DateTime date;
|
||||
|
||||
DiaryReminderNotification({
|
||||
required this.type,
|
||||
required this.isRead,
|
||||
required this.date,
|
||||
});
|
||||
|
||||
factory DiaryReminderNotification.fromJson(Map<String, dynamic> json, NotificationType type, {bool? isRead}) {
|
||||
return DiaryReminderNotification(type: type, isRead: isRead ?? false);
|
||||
return DiaryReminderNotification(type: type, isRead: isRead ?? false, date: parseDate(json['date']));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user