diff --git a/lib/src/event_controller.dart b/lib/src/event_controller.dart index 1d38b566..443ef474 100644 --- a/lib/src/event_controller.dart +++ b/lib/src/event_controller.dart @@ -96,6 +96,16 @@ class EventController extends ChangeNotifier { } } + /// Removes multiple [event] from this controller. + void removeWhere(bool Function(CalendarEventData element) test) { + for (final e in _events.values) { + e.removeWhere(test); + } + _rangingEventList.removeWhere(test); + _eventList.removeWhere(test); + notifyListeners(); + } + /// Returns events on given day. /// /// To overwrite default behaviour of this function, @@ -163,5 +173,5 @@ class EventController extends ChangeNotifier { notifyListeners(); } - //#endregion +//#endregion }