InboxMessage.fromJson constructor
InboxMessage.fromJson(
- Map<String, dynamic> json
)
Implementation
factory InboxMessage.fromJson(Map<String, dynamic> json) {
return InboxMessage(
id: json['id'] ?? '',
subject: json['subject'] ?? '',
title: json['title'] ?? '',
alert: json['alert'] ?? '',
sound: json['sound'] ?? '',
media: json['media'] != null ? Media.fromJson(json['media']) : null,
startDateUtc: json['startDateUtc'] != null
? DateTime.parse(json['startDateUtc'])
: null,
endDateUtc: json['endDateUtc'] != null
? DateTime.parse(json['endDateUtc'])
: null,
sendDateUtc: json['sendDateUtc'] != null
? DateTime.parse(json['sendDateUtc'])
: null,
url: json['url'] ?? '',
custom: json['custom'] ?? '',
customKeys:
(json['keys'] is Map) ? Map<String, String>.from(json['keys']) : null,
deleted: json['deleted'] ?? false,
read: json['read'] ?? false,
subtitle: json['subtitle'],
inboxMessage: json['inboxMessage'],
inboxSubtitle: json['inboxSubtitle'],
notificationMessage: json['notificationMessage'] != null
? NotificationMessage.fromJson(json['notificationMessage'])
: null,
messageType: json['messageType'],
);
}