Skip to content

Commit

Permalink
fixes for setting event color
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Wolf committed Sep 11, 2024
1 parent 44c248c commit ba0910b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/lib/presentation/pages/calendar_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
final colors = _eventColors?.map((eventColor) => Color(eventColor.color)).toList();
final newColor = await ColorPickerDialog.selectColorDialog(colors ?? [], context);
setState(() {
_event?.updateEventColor(_eventColors?.firstWhereOrNull((eventColor) => eventColor.color == newColor?.value));
_event?.updateEventColor(_eventColors?.firstWhereOrNull((eventColor) => Color(eventColor.color).value == newColor?.value));
});
}
},
Expand Down
2 changes: 1 addition & 1 deletion example/lib/presentation/pages/calendar_events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class _CalendarEventsPageState extends State<CalendarEventsPage> {
onPressed: () async {
final refreshEvents = await Navigator.push(context,
MaterialPageRoute(builder: (BuildContext context) {
return CalendarEventPage(_calendar);
return CalendarEventPage(_calendar, null, null, _eventColors);
}));
if (refreshEvents == true) {
await _retrieveCalendarEvents();
Expand Down

0 comments on commit ba0910b

Please sign in to comment.