Implements focus handling and hover for Material buttons.#31438
Merged
gspencergoog merged 2 commits intoflutter:masterfrom May 15, 2019
Merged
Implements focus handling and hover for Material buttons.#31438gspencergoog merged 2 commits intoflutter:masterfrom
gspencergoog merged 2 commits intoflutter:masterfrom
Conversation
e67ec2c to
fa09183
Compare
eb248be to
570209c
Compare
9984dd2 to
7cfcf63
Compare
249b5b7 to
5e6c90c
Compare
darrenaustin
approved these changes
May 10, 2019
Contributor
darrenaustin
left a comment
There was a problem hiding this comment.
Some minor comments and questions aside, LGTM.
packages/flutter/test/material/floating_action_button_test.dart
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
What was the reason for this change?
Contributor
Author
There was a problem hiding this comment.
Because the hover support adds another frame to the animation.
Contributor
There was a problem hiding this comment.
Why was this removed?
Contributor
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?