CalendarEvent.fromJson constructor
CalendarEvent.fromJson(Map<String, dynamic> data)
Implementation
CalendarEvent.fromJson(Map<String, dynamic> data) {
this.eventId = data["eventId"];
this.title = data["title"];
this.description = data["description"];
var date = data["startDate"];
if (date != null) {
this.startDate = DateTime.fromMillisecondsSinceEpoch(date);
}
date = data["endDate"];
if (date != null) {
this.endDate = DateTime.fromMillisecondsSinceEpoch(date);
}
this.location = data["location"];
this.isAllDay = data["isAllDay"];
this.hasAlarm = data["hasAlarm"];
if (data["reminder"] != null) {
this.reminder = Reminder.fromJson(data["reminder"]);
}
}