-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Implements focus handling and hover for Material buttons. #31438
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
e67ec2c to
fa09183
Compare
eb248be to
570209c
Compare
9984dd2 to
7cfcf63
Compare
249b5b7 to
5e6c90c
Compare
darrenaustin
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.
Some minor comments and questions aside, LGTM.
packages/flutter/test/material/floating_action_button_test.dart
Outdated
Show resolved
Hide resolved
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.
What was the reason for this change?
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.
Because the hover support adds another frame to the animation.
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.
Why was this removed?
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.
Actually, it doesn't need to be removed. For a while I had a bug (but didn't know it) that had the hover animation still running here. It's fixed now.
7c85947 to
5ce66cb
Compare
5ce66cb to
2334b5f
Compare
0af4e29 to
4824d5c
Compare
4824d5c to
82f83d9
Compare
ed049c5 to
3cc0401
Compare
3cc0401 to
396ef1d
Compare
396ef1d to
388e9d6
Compare
Description
This implements focus and hover handling for Material buttons. It inserts
Focuswidgets into the tree in order to allow buttons to be focusable via keyboard traversal (a.k.a. TAB traversal), andListenerwidgets into theInkWellto allow the detection of hover states for widgets.Related Issues
Addresses #11344, #1608, and #13264.
Tests
I added the following tests:
InkWellMaterialButtonOutlineButton,RaisedButton, andFlatButtonChecklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?