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['customKeys'] != null
? Map<String, String>.from(json['customKeys'])
: null,
deleted: json['deleted'] ?? false,
read: json['read'] ?? false,
);
}