Answers for "ERROR:flutter/lib/ui/ui_dart_state-cc unhandled exception: servicesbinding.defaultbinarymessenger was accessed before the binding was initialized"

7

ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.

// add this, and it should be the first line in main method
  WidgetsFlutterBinding.ensureInitialized();
Posted by: Guest on June-20-2020

Code answers related to "ERROR:flutter/lib/ui/ui_dart_state-cc unhandled exception: servicesbinding.defaultbinarymessenger was accessed before the binding was initialized"

Browse Popular Code Answers by Language