Relative Content

Tag Archive for androidfluttereventscalendar

Flutter: Call to Add2Calendar.addEvent2Cal(event) of package add_2_calendar returns false on some devices

I am creating a Flutter application where I want to create an calendar entry for an event.
So far I am releasing only for Android phones.
When I tap the button that creates the calendar entry, it is successful only on Samsung phones.
I have tested on Xiaomi(Xiaomi T13 Pro, Xiaomi Note Mi 10 Lite), Pocophone, OnePlus, Samsung S22, Samsung Fold 3 and other phones.
Only the Samsung phones were able to create the event successfully.
My code is below. The function requestPermissions() succesfully requests and gets the permissions granted (if the user approves), though on Samsung phones, I can completely omit it and it will still work. On other phones it will print false even if I grant permissions.