ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized. code example
Example: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
// add this, and it should be the first line in main method
WidgetsFlutterBinding.ensureInitialized();