InboxNotificationData.fromJson constructor
InboxNotificationData.fromJson(
- Map<String, dynamic> json
)
Implementation
factory InboxNotificationData.fromJson(Map<String, dynamic> json) {
final createdAt = json['createdAt'] as String?;
return InboxNotificationData(
id: json['id']?.toString() ?? '',
title: json['title'],
body: json['body'],
deeplink: json['deeplink'],
topicCode: json['topicCode'],
isRead: json['isRead'] ?? false,
createdAt: createdAt != null ? DateTime.tryParse(createdAt) : null,
);
}