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. 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();