toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
'UID': uid,
'DTSTAMP': formatDateTime(dtstamp),
'DTSTART': formatDateTime(dtstart),
'DTEND': formatDateTime(dtend),
'SUMMARY': summary,
'DESCRIPTION': description,
'LOCATION': location,
'STATUS': status?.name != null ? Heplers.camelToSnake(status!.name).toUpperCase() : null,
'RRULE': rrule?.toJson(),
'EXDATE': exDates?.map((date) => formatDateTime(date)).toList(),
'ATTENDEE': attendees?.map((e)=>e.toJson()).toList(),
'ORGANIZER': organizer?.mailto,
'CONTACT': contact,
'ATTACH': attachment,
};
}