[desktop] default to shrink wrap on desktop platforms #66754
Merged
Conversation
| ]) { | ||
| final ThemeData themeData = ThemeData(platform: platform); | ||
| expect(themeData.materialTapTargetSize, MaterialTapTargetSize.shrinkWrap); | ||
| } | ||
| }); |
gspencergoog
Sep 28, 2020
Contributor
Try using a target platform variant here. Then the test body is just a switch statement, and it runs one test per platform, so if it fails, it's clear which platform failed.
Suggested change
});
}, variant: TargetPlatformVariant.all());
Try using a target platform variant here. Then the test body is just a switch statement, and it runs one test per platform, so if it fails, it's clear which platform failed.
Suggested change
| }); | |
| }, variant: TargetPlatformVariant.all()); |
jonahwilliams
Sep 28, 2020
Author
Member
Oh TIL, this is nice!
Oh TIL, this is nice!
jonahwilliams
Sep 28, 2020
Author
Member
Done
Done
2d37e08
into
flutter:master
33 checks passed
33 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
MaterialTapTargetSize adds some additional padding to bring the hit test size to 48x48 for Android's mobile accessibility guidelines. This isn't necessary for desktop devices, so default to the shrinkwrap mode that compresses slightly