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

@@ -24,7 +24,9 @@ class NotificationsService {
ChosenPlanStartedToClientNotification.fromJson(notificationJson['data'], type, isRead: readDate != null),
NotificationType.chosenPlanTomorrowReminderToClientNotification =>
ChosenPlanTomorrowReminderToClientNotification.fromJson(notificationJson['data'], type, isRead: readDate != null),
NotificationType.diaryReminderNotification => DiaryReminderNotification.fromJson(notificationJson['data'], type, isRead: readDate != null),
NotificationType.diaryReminderNotification => DiaryReminderNotification.fromJson(
(notificationJson['data'] as Map<String, dynamic>).putIfAbsent('date', () => notificationJson['created_at']), type,
isRead: readDate != null),
NotificationType.consultantLeftComment => ConsultantLeftCommentNotification.fromJson(notificationJson['data'], type, isRead: readDate != null),
NotificationType.personalizedDietIsDefined =>
PersonalizedDietIsDefinedNotification.fromJson(notificationJson['data'], type, isRead: readDate != null),