Journal.fromMap constructor
Implementation
factory Journal.fromMap(Map<String, dynamic> map) {
return Journal(
uid: map['uid'] ?? '',
summary: map['summary'],
description: map['description'],
attachments: map['attachments'] != null
? List<Attachment>.from(
map['attachments']?.map((x) => Attachment.fromMap(x)))
: null,
attendees: map['attendees'] != null
? List<Attendee>.from(
map['attendees']?.map((x) => Attendee.fromMap(x)))
: null,
organizer:
map['organizer'] != null ? Organizer.fromMap(map['organizer']) : null,
created: map['created'] != null
? DateTime.fromMillisecondsSinceEpoch(
int.parse(map['created'].toString()))
: null,
lastModified: map['last_modified'] != null
? DateTime.fromMillisecondsSinceEpoch(
int.parse(map['last_modified'].toString()))
: null,
startDate: map['start_date'] != null
? DateTime.fromMillisecondsSinceEpoch(
int.parse(map['start_date'].toString()))
: null,
endDate: map['end_date'] != null
? DateTime.fromMillisecondsSinceEpoch(
int.parse(map['endDate'].toString()))
: null,
recurrenceRule: map['recurrence_rule'] != null
? RecurrenceRule.fromMap(map['recurrence_rule'])
: null,
);
}