Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Wolf committed Sep 11, 2024
1 parent ba0910b commit c702f17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion example/lib/presentation/pages/calendars.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class _CalendarsPageState extends State<CalendarsPage> {
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) {
Expand Down
7 changes: 2 additions & 5 deletions lib/src/models/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c702f17

Please sign in to comment.