builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
260 stars 263 forks source link

Creating events should return eventId #414

Open JulianGerman opened 2 years ago

JulianGerman commented 2 years ago

How can I add custom eventId from f.e secure storage when i'm adding new Event to Calendar? I need it to add features like deleting event by Id. In class Event there is property eventId, read-only and i can't set value to this property.

thomassth commented 2 years ago

I'm unsure about it.

I think our event IDs are set by the system itself, which doesn't seem to accept custom IDs.

https://developer.android.com/guide/topics/providers/calendar-provider

It would be very useful to set custom IDs, but we might need to do an extra layer of conversion, which can be slow and/or troublesome.

JulianGerman commented 2 years ago

Yes, i know that your event Id's is a read-only property, but how can we read it? when I want to print it after adding event, the event Id is null so i haven't any option to get this value to delete this event in the future.