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

Fix incorrect usage of WidgetFlutterBindings.ensureInitialized() #100

Merged
merged 4 commits into from
May 31, 2023
Merged

Conversation

matux
Copy link
Collaborator

@matux matux commented May 31, 2023

Description of the change

Fixes some deprecation issues, and an incorrect usage of WidgetFlutterBindings.ensureInitialized() on Flutter 3.10.x:

The Flutter bindings were initialized in a different zone than is now being used. This will likely cause confusion and bugs as any zone-specific configuration will inconsistently use the configuration of the original binding initialization zone or this zone based on hard-to-predict factors such as which zone was active when a particular callback was set.
It is important to use the same zone when calling ensureInitialized on the binding as when calling runApp later.

This was reported #90 (comment) and #90 (comment).

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

This is being partially tracked here: #90, but the issue itself is about something else, so this wouldn't close the issue.

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

@matux matux requested a review from ijsnow May 31, 2023 21:02
@matux matux self-assigned this May 31, 2023
@matux matux removed the request for review from ijsnow May 31, 2023 21:06
Copy link

@cyrusradfar cyrusradfar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the update @matux -- looks 🧱 solid

@matux matux merged commit 819139a into main May 31, 2023
@matux matux deleted the fix_310 branch May 31, 2023 22:09
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.

2 participants