appendCalendarEvent method
Implementation
Map<String, String> appendCalendarEvent(CalendarEventOptions? event) {
if (event == null) return {};
return {
// Essential event details
'calendarEvent[title]': event.title,
'calendarEvent[startDate]': event.startDate.toIso8601String(),
'calendarEvent[endDate]': event.endDate.toIso8601String(),
// Optional details (included conditionally)
if (event.description != null) 'calendarEvent[description]': event.description!,
if (event.location != null) 'calendarEvent[location]': event.location!,
if (event.url != null) 'calendarEvent[url]': event.url!,
if (event.organizer != null) 'calendarEvent[organizer]': event.organizer!,
};
}