-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Add flag to ThemeData to expand tap targets of certain material widgets #18369
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
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
39cd943
add semantic container, selectability, and enabled state to chip
cf8a1c3
add tests for chip semantics
07d5e9b
Merge branch 'master' of github.com:flutter/flutter into a11y_16964
42402a1
add more test coverage, make sure hasEnabledState is present
be5801f
update tests and use canTap
ef41d7f
increase tap target using outer padding
2a9a87e
changed outer padding to outer constraints, update some tests
5a90a0e
increase time picker height by 12dp to account for bigger flat button
cdabb2e
Update button.dart
d8a89ca
adjust minimum heights of other buttons and fix some tests
423a093
Merge branch 'a11y_615' of github.com:jonahwilliams/flutter into a11y…
985fdb6
temporarily turn off two failing tests
5944354
Merge branch 'master' of github.com:flutter/flutter into a11y_16964
6e79412
increase minimum touch target to 48x48
c3fbe84
make outer constraints configurable
21c2941
increase size of checkbox, switch, and radio button to 48 by 48 to co…
jonahwilliams d412128
add flag for expanding tap targets
4bf34be
add smoke test for tap target size
61c6e30
switch flag for enum
8a3f125
merge a11y_615 into flag change
7bb9ff9
merge material button tap target changes adjusted to use new flag
3bf7bcf
Merge branch 'a11y_16964' into tap_target_flag
e0b1f28
fix imports and remove public outerConstraints property of chip
440c962
address comments
a90b986
fix spelling and add switch statement in time picker
dbf3dae
fix new wrapping in chip
1174a2d
Merge remote-tracking branch 'origin/tap_size' into tap_target_flag
53d3be6
update checkbox, radio, and switch to use additonalConstraints instea…
0e08fe8
Wrap CheckboxListTile, RadioListTile, and SwitchListTile in a collaps…
5fb4873
renamed MaterialTapTargetSize enums and add size tests for Checkbox, …
090b3d2
add size tests to buttons, mini fab, and raw chip
bb6c3ac
make Checkbox, Radio, and Switch take a MaterialTapTargetSize enum in…
b26dafb
effects vs affects
c8d8cf6
Merge branch 'master' of github.com:flutter/flutter into tap_target_flag
jonahwilliams 2e205be
refactor all updated material widgets to take materialTapTargetSize a…
jonahwilliams a47e806
add redirecting render object
5f475d8
merge with remote
7e61552
Address comments
190be7b
increase chip hit detection and address button comments
df92deb
Add ink tests for raw material button
jonahwilliams 0145ffb
add tests for material chip behavior
jonahwilliams fea5961
Merge branch 'master' of https://github.com/flutter/flutter into tap_…
jonahwilliams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
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 is an interesting approach.
Why can't we just make the single GestureDetector bigger though?
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.
The GestureDetector/InkWell/Material is a delicate ecosystem.
InkWell (which contains the gesture detector) uses context to find a parent material where it draws the splashes. Any increase in the size of the gesture detector, which is sized by the material, necessarily increase the material size which would increase the visible appearance of the button.
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.
Oh, right, I forgot that buttons had their own Material...
Please add a test to make sure that only one of the GestureDetectors gets the pointer down event (which I believe this code does as you wrote it but it's something we should make sure we don't regress since it's so subtle).
Also please make sure there's a test that when you tap inside the button, the splash starts where you tapped, but when you tap outside the button, it starts wherever we decided it should start.