Skip to content

Commit

Permalink
fix(calendar): Updating the eventlist updates internal data every time
Browse files Browse the repository at this point in the history
…#86

Closes #86
  • Loading branch information
agfeo-rw committed Aug 30, 2024
1 parent d23243f commit ca43df9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [0.4.12] - 2024-08-30
* Issue 86: Updtae of the eventlist now works every time

## [0.4.11] - 2024-08-29
* Automatic scrolling to nearest date from today on loading the event list view
* New callback method parameter onTodayButtonPressed
Expand Down
9 changes: 1 addition & 8 deletions lib/flutter_neat_and_clean_calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,7 @@ class _CalendarState extends State<Calendar> {
void didUpdateWidget(covariant Calendar oldWidget) {
super.didUpdateWidget(oldWidget);
// Überprüfen, ob die neuen Events sich von den alten unterscheiden
if (oldWidget.eventsList != widget.eventsList) {
// When setting the initial date, the eventsmap must be updated. The eventsmap is used to
// store the events for each day. The eventsmap is used to display the events in the calendar.
// It is basically the internal store of the events. Because the events are passed as a list
// to the calendar, the eventsmap must be created from the list. This is done in the
// _updateEventsMap method.
_updateEventsMap();
}
_updateEventsMap();
}

/// Scrolls the list view to the top if the event list view is shown.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >-
Simple and clean flutter calendar with ability to slide up/down to show
weekly/monthly calendar. Fork of
https://pub.dev/packages/flutter_clean_calendar
version: 0.4.11
version: 0.4.12
homepage: https://github.com/rwbr/flutter_neat_and_clean_calendar

environment:
Expand Down

0 comments on commit ca43df9

Please sign in to comment.