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

Unhandled Exception: Bad state: Cannot add event after closing #55

Closed
farismohammed opened this issue Oct 29, 2020 · 4 comments
Closed

Comments

@farismohammed
Copy link

Throwing an exception Unhandled Exception: Bad state: Cannot add event after closing, when closing dropdown before future completes,

@salim-lachdhaf
Copy link
Owner

Could you please past an example for the issue and describe the scenario to reproduce the problem

@farismohammed
Copy link
Author

When the user opens the future filter dropdown and pops it immediately before the current future completes, The dropdown is popped out, but the future complete after the dropdown closed, that time this exception is thrown. like below...

Restarted application in 1,058ms.
[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: Bad state: Cannot add event after closing
#0 _StreamController.addError (dart:async/stream_controller.dart:633:24)
#1 _SelectDialogState.manageItemsByFilter
package:dropdown_search/src/selectDialog.dart:252

#2 _SelectDialogState.initState.
package:dropdown_search/src/selectDialog.dart:83
#3 new Future.delayed. (dart:async/future.dart:326:39)
#4 _rootRun (dart:async/zone.dart:1182:47)
#5 _CustomZone.run (dart:async/zone.dart:1093:19)
#6 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#7 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1037:23)
#8 _rootRun (dart:async/zone.dart:1190:13)
#9 _CustomZone.run (dart:async/zone.dart:1093:19)
#10 _CustomZone.bindCallback. (dart:async/zone.dart:1021:23)
#11 Timer._createTimer. (dart:async-patch/timer_patch.dart<…>

@salim-lachdhaf
Copy link
Owner

which version are you using ?

salim-lachdhaf added a commit that referenced this issue Oct 30, 2020
Invoke the dropdown programmatically
change dropdownSearch selected value programmatically
fix issue #25
fix issue #36
fix issue #51
fix issue #55
@salim-lachdhaf
Copy link
Owner

check v 0.4.6, this should be fixed.

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

No branches or pull requests

2 participants