-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Use WidgetsBinding.instance.platformDispatcher in windowing instead of PlatformDispatcher.instance #178799
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
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the windowing implementation across Linux, macOS, and Win32 platforms to consistently use WidgetsBinding.instance.platformDispatcher instead of directly accessing PlatformDispatcher.instance. This change aligns with the recommended approach, allowing for greater flexibility, particularly when overriding the platform dispatcher is necessary. The modifications are straightforward replacements of the access pattern, ensuring consistency and adherence to best practices within the Flutter framework. Additionally, some formatting adjustments were made in the macOS windowing file to improve readability for longer lines of code.
…f PlatformDispatcher.instance
4d16782 to
d13f5d0
Compare
robert-ancell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… instead of PlatformDispatcher.instance (flutter/flutter#178799)
… instead of PlatformDispatcher.instance (flutter/flutter#178799)
flutter/flutter@de4be4f...9f383e0 2025-11-20 [email protected] Roll Dart SDK from 331595776540 to 5b21f8a7d5d3 (1 revision) (flutter/flutter#178861) 2025-11-20 [email protected] Roll ICU from f27805b7d7d8 to a86a32e67b8d (1 revision) (flutter/flutter#178859) 2025-11-20 [email protected] Roll Dart SDK from d6f9477a2d9f to 331595776540 (1 revision) (flutter/flutter#178851) 2025-11-20 [email protected] Roll Skia from 5bdda9a41db9 to 6284b4f09e14 (3 revisions) (flutter/flutter#178849) 2025-11-20 [email protected] Roll Skia from 24c28206d912 to 5bdda9a41db9 (2 revisions) (flutter/flutter#178845) 2025-11-20 [email protected] Roll Dart SDK from 7506c64a5117 to d6f9477a2d9f (1 revision) (flutter/flutter#178844) 2025-11-20 [email protected] Roll Skia from fd41f3650729 to 24c28206d912 (2 revisions) (flutter/flutter#178841) 2025-11-20 [email protected] Use WidgetsBinding.instance.platformDispatcher in windowing instead of PlatformDispatcher.instance (flutter/flutter#178799) 2025-11-20 [email protected] [Impeller] Adds support for r32float textures (flutter/flutter#178418) 2025-11-20 [email protected] Roll Skia from a283da7a6b6c to fd41f3650729 (2 revisions) (flutter/flutter#178838) 2025-11-20 [email protected] [Impeller] Deny-list Adreno 640 and 650 for Vulkan eligibility. (flutter/flutter#178833) 2025-11-19 [email protected] Roll Skia from b5dc8c3494ac to a283da7a6b6c (8 revisions) (flutter/flutter#178832) 2025-11-19 [email protected] Roll Dart SDK from f7e9bd245fd9 to 7506c64a5117 (3 revisions) (flutter/flutter#178828) 2025-11-19 [email protected] Allow the `RawAutocomplete` to display the options even when one is selected (flutter/flutter#177705) 2025-11-19 [email protected] [web] Skip flaky service worker test (flutter/flutter#178820) 2025-11-19 [email protected] Only call glCheckFrameBufferStatus in the render pass in debug builds (flutter/flutter#178707) 2025-11-19 [email protected] Manual pub roll (flutter/flutter#178687) 2025-11-19 [email protected] Document that `error` parameter must be initialized (flutter/flutter#177730) 2025-11-19 [email protected] Update `_CircularProgressIndicatorState` to use `transform` directly (flutter/flutter#178569) 2025-11-19 [email protected] Fix layout for macOS frameworks for code assets (flutter/flutter#178625) 2025-11-19 [email protected] Roll Packages from 34746bb to 8f72e4b (7 revisions) (flutter/flutter#178800) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…f PlatformDispatcher.instance (flutter#178799) This is the recommended way to do this as it allows us to override the platform dispatcher when that is necessary ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
…f PlatformDispatcher.instance (flutter#178799) This is the recommended way to do this as it allows us to override the platform dispatcher when that is necessary ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
…f PlatformDispatcher.instance (flutter#178799) This is the recommended way to do this as it allows us to override the platform dispatcher when that is necessary ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
…f PlatformDispatcher.instance (flutter#178799) This is the recommended way to do this as it allows us to override the platform dispatcher when that is necessary ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
This is the recommended way to do this as it allows us to override the platform dispatcher when that is necessary
Pre-launch Checklist
///).