From 616812c648e63f4ef4833bb9c5a9e2bb69c17059 Mon Sep 17 00:00:00 2001 From: Hareesh-Nandigrama Date: Mon, 7 Aug 2023 23:56:38 +0530 Subject: [PATCH] added necessary files --- .../notifications/notification_model.g.dart | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/models/notifications/notification_model.g.dart diff --git a/lib/models/notifications/notification_model.g.dart b/lib/models/notifications/notification_model.g.dart new file mode 100644 index 00000000..1d88a869 --- /dev/null +++ b/lib/models/notifications/notification_model.g.dart @@ -0,0 +1,28 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'notification_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +NotifsModel _$NotifsModelFromJson(Map json) => NotifsModel( + title: json['title'] as String?, + body: json['body'] as String?, + read: json['read'] as bool?, + category: json['category'] as String, + time: json['createdAt'] == null + ? null + : DateTime.parse(json['createdAt'] as String), + messageId: json['_id'] as String, + ); + +Map _$NotifsModelToJson(NotifsModel instance) => + { + 'title': instance.title, + 'body': instance.body, + 'category': instance.category, + 'read': instance.read, + 'createdAt': instance.time?.toIso8601String(), + '_id': instance.messageId, + };