Unhandled Exception: Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized
Closed this issue · 2 comments
I cloned the code and ran the application. I got this error:
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized. E/flutter ( 3960): If you're running an application and need to access the binary messenger before
runApp()has been called (for example, during plugin initialization), then you need to explicitly call the
WidgetsFlutterBinding.ensureInitialized()first. E/flutter ( 3960): If you're running a test, you can call the
TestWidgetsFlutterBinding.ensureInitialized()as the first line in your test's
main() method to initialize the binding.
Maybe you can resolve by this answer: https://stackoverflow.com/questions/57689492/flutter-unhandled-exception-servicesbinding-defaultbinarymessenger-was-accesse
was solved in the version 0.2.0