Skip to content

Commit

Permalink
Updated to read the group in example app when editing an event
Browse files Browse the repository at this point in the history
  • Loading branch information
bhl09 committed Jan 23, 2020
1 parent a33a702 commit 2eb9bd6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
_weekOfMonth = _event.recurrenceRule.weekOfMonth ?? WeekNumber.First;
_selectedDayOfWeek = _daysOfWeek.isNotEmpty ? _daysOfWeek.first : DayOfWeek.Monday;
_dayOfMonth = _event.recurrenceRule.dayOfMonth ?? 1;

if (_daysOfWeek.isNotEmpty) {
_updateDaysOfWeekGroup();
}
}
}

Expand Down Expand Up @@ -403,7 +407,7 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
} else {
_daysOfWeek.remove(day);
}
_updateDaysOfWeekGroup(day);
_updateDaysOfWeekGroup(selectedDay: day);
});
},
);
Expand Down Expand Up @@ -725,7 +729,7 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
}
}

void _updateDaysOfWeekGroup(DayOfWeek selectedDay) {
void _updateDaysOfWeekGroup({DayOfWeek selectedDay}) {
var deepEquality = const DeepCollectionEquality.unordered().equals;

// If _daysOfWeek contains Monday to Friday
Expand Down

0 comments on commit 2eb9bd6

Please sign in to comment.