added date parsing for reminder

This commit is contained in:
Username1548
2025-07-07 14:16:23 +07:00
parent ad538472f0
commit 43e9098d8d
7 changed files with 51 additions and 35 deletions

View File

@@ -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']));
}
}