Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventController remove event don't work #27

Closed
AlexandreMaul opened this issue Jan 27, 2022 · 0 comments · Fixed by #28
Closed

EventController remove event don't work #27

AlexandreMaul opened this issue Jan 27, 2022 · 0 comments · Fixed by #28
Assignees

Comments

@AlexandreMaul
Copy link
Contributor

AlexandreMaul commented Jan 27, 2022

#28

I have a CalendarControllerProvider with an EventController. When i try to do :
_eventController.remove(event);

I've got this error :

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Concurrent modification during iteration: Instance(length:1224) of '_GrowableList'.
E/flutter (19491): #0      ListIterator.moveNext (dart:_internal/iterable.dart:336:7)
E/flutter (19491): #1      _MonthEvent.removeEvent (package:calendar_view/src/event_controller.dart:204:21)
E/flutter (19491): #2      _YearEvent.removeEvent (package:calendar_view/src/event_controller.dart:174:11)
E/flutter (19491): #3      EventController.remove (package:calendar_view/src/event_controller.dart:58:11)
E/flutter (19491): #4      _CalendarPageState.showCreateEditEventDialog (package:myapp/page/calendar_page/calendar_page.dart:468:26)

I think it's because in MonthEvent, in removeEvent (line 203). We try to remove an event when we read the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants