0

I am getting this error once in a while when I am closing a screen that has the Google Maps widget in web.

Error: Bad state: Cannot add new events after calling close
    at Object.throw_ [as throw] (http://localhost:46385/dart_sdk.js:5080:11)
    at _AsyncBroadcastStreamController.new.add (http://localhost:46385/dart_sdk.js:34435:44)
    at http://localhost:46385/packages/google_maps_flutter_web/src/types.dart.lib.js:572:33
    at _RootZone.runUnaryGuarded (http://localhost:46385/dart_sdk.js:40448:11)
    at [_sendData] (http://localhost:46385/dart_sdk.js:33985:22)
    at _DelayedData.new.perform (http://localhost:46385/dart_sdk.js:37447:28)
    at _StreamImplEvents.new.handleNext (http://localhost:46385/dart_sdk.js:37557:15)
    at async._AsyncCallbackEntry.new.callback (http://localhost:46385/dart_sdk.js:37305:16)
    at Object._microtaskLoop (http://localhost:46385/dart_sdk.js:40778:13)
    at _startMicrotaskLoop (http://localhost:46385/dart_sdk.js:40784:13)
    at http://localhost:46385/dart_sdk.js:36261:9

any ideas?

Initially, I thought it was something to do with my TextEditingControllers, but after removing them - the issue still persists.

When I am using Get.back() from GetX the error appears.

lepsch
  • 8,927
  • 5
  • 24
  • 44
  • Welcome to SO! Would you please [edit] your question and copy-paste a [minimal-reproducible-example](https://stackoverflow.com/help/minimal-reproducible-example) so other users can test it and find an answer for you? – lepsch Aug 05 '22 at 19:27
  • Check this https://stackoverflow.com/questions/55536461/flutter-unhandled-exception-bad-state-cannot-add-new-events-after-calling-clo – Muraino Aug 05 '22 at 19:27
  • Lol I am so dumb - I was using GetBack() internally of a Dialog instead of calling Get.Back() at onConfirm call back that Dialog has -_-. Sorry – Alex Vanellis Aug 07 '22 at 19:24

0 Answers0