'How to use device_calendar plugin in flutter?

I'm developing an application where the user can add a reminder in their local calendar from our app.

The user selects the date and time, and books a service. After the booking, I want to provide them with a button that takes them to the calendar app and creates an event filled with given date, time and title.

I've tried to use the device_calendar plugin for this but the documentation is not clear to me.

Image - This is a screenshot of a demo app with the time, date and service name. When user clicks on the calendar button, it opens their device's calendar with a new event on this date and time with the service name as title.



Code/Resources I've tried till now:

  • Example on device_calendar github. (Not easy to understand) Link

  • This article. (Lots of errors and outdated dependencies) Link



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source