diff --git a/example/lib/presentation/pages/calendars.dart b/example/lib/presentation/pages/calendars.dart index 5dc921bc..bc434173 100644 --- a/example/lib/presentation/pages/calendars.dart +++ b/example/lib/presentation/pages/calendars.dart @@ -63,7 +63,9 @@ class _CalendarsPageState extends State { itemCount: _calendars.length, itemBuilder: (BuildContext context, int index) { return GestureDetector( - key: ValueKey(_calendars[index].color), + key: Key(_calendars[index].isReadOnly == true + ? 'readOnlyCalendar${_readOnlyCalendars.indexWhere((c) => c.id == _calendars[index].id)} color:${_calendars[index].color}' + : 'writableCalendar${_writableCalendars.indexWhere((c) => c.id == _calendars[index].id)} color:${_calendars[index].color}'), onTap: () async { await Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) { diff --git a/lib/src/models/event.dart b/lib/src/models/event.dart index 8b170910..d106eac1 100644 --- a/lib/src/models/event.dart +++ b/lib/src/models/event.dart @@ -50,13 +50,10 @@ class Event { /// Indicates if this event is of confirmed, canceled, tentative or none status EventStatus? status; - /// Read-only. Color of the event - - - /// Only updatable for Android calendars where [DeviceCalendarPlugin.retrieveEventColors] returns an empty list. + /// Read-only. Android exclusive. Updatable only using [Event.updateEventColor] with color from [DeviceCalendarPlugin.retrieveEventColors] int? color; - /// Only updatable for colors of [DeviceCalendarPlugin.retrieveEventColors]. + /// Read-only. Android exclusive. Updatable only using [Event.updateEventColor] with color from [DeviceCalendarPlugin.retrieveEventColors] int? colorKey; ///Note for development: