This is simple program to add google calender event from flutter
- url_launcher:
eventData hold the Data
Map eventData = {
'eventName': 'Flutter Kerala',
'eventDetails': 'Flutter',
'eventStarting': DateTime.utc(2019, 7, 20, 20, 18, 04).toUtc(),//! need to convert to Utc
'eventEnding': DateTime.utc(2020, 7, 20, 20, 18, 04).toUtc(),//! need to convert to Utc
};
To know more about Dart utc format
Then by using url_launcher we will launch the url
String url = https://www.google.com/calendar/render?action=TEMPLATE&text=${eventData['eventName']}&dates=${eventData['eventStartingDate']}/${eventData['eventName']}Z&details=${eventData['eventEnding']}&sf=true&output=xml;
await launch(url);
launch function will launch the url