Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main: Initialize WidgetsBinding before running the app. #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kwight
Copy link

@kwight kwight commented Feb 14, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant