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
A bunch of cleanups and a missing ShortcutRegistar
in WidgetsApp
#104560
Conversation
@@ -1730,7 +1730,9 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver { | |||
actions: widget.actions ?? WidgetsApp.defaultActions, | |||
child: FocusTraversalGroup( | |||
policy: ReadingOrderTraversalPolicy(), | |||
child: child, | |||
child: ShortcutRegistrar( |
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.
This change does not look like a clean up. Is it intended?
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.
Ok I see you mentioning it in the PR. Maybe this should be the title of this PR.
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.
You're right, it's not really a "cleanup", but something that was missing from the previous PR that I committed with the ShortcutRegistry
. Without this, people will have to add their own registrar manually.
I've added a test to make sure it exists.
MenuBar
development.ShortcutRegistar
in WidgetsApp
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
This pull request is not suitable for automatic merging in its current state.
|
2272134
to
6a41416
Compare
…lutter#104560) A bunch of random cleanup things I found while doing MenuBar development. Changes an if test to an assert in binding.dart, since the if should always be true. Adds the default ShortcutRegistrar that should have been in the ShortcutRegistry PR. Moves a debug message in the FocusManager to print the result after the focus change instead of before. Reorders the test parameters in theme_data_test.dart to match the order of the theme data fields everywhere else.
Description
A bunch of random cleanup things I found while doing
MenuBar
development.binding.dart
, since the if should always be true.ShortcutRegistrar
that should have been in theShortcutRegistry
PR.FocusManager
to print the result after the focus change instead of before.Tests
ShortcutRegistar
inWidgetsApp
.