flutter_landmarks icon indicating copy to clipboard operation
flutter_landmarks copied to clipboard

Main: Initialize WidgetsBinding before running the app.

Open kwight opened this issue 4 years ago • 0 comments

This PR ensures a WidgetsBinding instance is initialized before running the app.

If this instance is not initialized before our loadData() call, the app will fail to compile with an unhandled exception: "ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized."

Testing Instructions

  • Check out this repo and attempt to start the app.
  • Notice it will fail to start, breaking on the unhandled exception given above.
  • Switch to this PR.
  • Restart the app, and verify it loads correctly.

kwight avatar Feb 14 '21 21:02 kwight