-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Update ButtonStyle documentation #168062
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
Update ButtonStyle documentation #168062
Conversation
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
acb0e53 to
e5aa4e0
Compare
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
e5aa4e0 to
73bd23b
Compare
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
73bd23b to
d71c7de
Compare
|
Thanks for the PR Bruno! By coincidence I was just looking at something super similar - #94098 The delete button on input chip also ends up being less than the material tap target size, unless updated to use MaterialTapTargetSize.padded + VisualDensity.standard.
You are so right about this. I wonder, do you have a sense of how many components are affected by this quirk? It might be worth investigating if we can change this to ensure we have the minimum tap target respected by default. It is very important for accessibility. Maybe we can look at the default values in ThemeData? WDYT? |
|
@Piinks The issue targeted by this PR is somewhat different than #94098. Here the problem is that So I opted for a documentation update that explains the current behavior because:
|
Piinks
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.
LGTM - thanks for the detailed explanation. :)
d71c7de to
45095a3
Compare
Co-authored-by: Kate Lovett <[email protected]>
2fa082c to
24a71aa
Compare
Roll Flutter from 33cdd8ef31dc to 85564cbba9e7 (39 revisions) flutter/flutter@33cdd8e...85564cb 2025-05-23 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#169276)" (flutter/flutter#169347) 2025-05-23 [email protected] Roll Skia from a01ea49f53a4 to 956fd8b14e22 (1 revision) (flutter/flutter#169334) 2025-05-23 [email protected] Roll Dart SDK from 4de10a11ceb9 to 085f110ecf33 (1 revision) (flutter/flutter#169333) 2025-05-23 [email protected] Roll Skia from bcc7e7fce10e to a01ea49f53a4 (1 revision) (flutter/flutter#169329) 2025-05-23 [email protected] Roll Skia from 18b85aced9b7 to bcc7e7fce10e (3 revisions) (flutter/flutter#169323) 2025-05-23 [email protected] Roll Dart SDK from 2a45b2f88a4f to 4de10a11ceb9 (2 revisions) (flutter/flutter#169322) 2025-05-23 [email protected] Remove patching of `package_config.json` from Flutter Pub wrapper. (flutter/flutter#169306) 2025-05-23 [email protected] Add missing dart_dynamic_modules flag for iOS DDM simulator builds (flutter/flutter#169254) 2025-05-23 [email protected] Roll Skia from ea73ccdc1417 to 18b85aced9b7 (6 revisions) (flutter/flutter#169315) 2025-05-23 [email protected] Add flag to exclude focus for hidden children in Visibility, maintainFocusability. Set maintainFocusability to false in IndexedStack (flutter/flutter#159133) 2025-05-23 [email protected] [Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (flutter/flutter#169276) 2025-05-23 [email protected] Roll Dart SDK from 8f85d89fdc23 to 2a45b2f88a4f (6 revisions) (flutter/flutter#169312) 2025-05-23 [email protected] Removes unnecessary parentheses (flutter/flutter#169015) 2025-05-22 [email protected] Unpin test/test_core/test_api packages (flutter/flutter#169198) 2025-05-22 [email protected] [Engine] Fix an edge case of RoundSuperellipseParam::Contains with sharp corners (flutter/flutter#167977) 2025-05-22 [email protected] Replace goldens in test/cupertino/nav_bar_transition_test.dart (flutter/flutter#169172) 2025-05-22 [email protected] Roll Skia from 13a299964c9f to ea73ccdc1417 (35 revisions) (flutter/flutter#169303) 2025-05-22 [email protected] Increase sub-task timeout for Mac web_tool_tests (flutter/flutter#169307) 2025-05-22 [email protected] Fix crash on two finger selection gesture (flutter/flutter#168598) 2025-05-22 [email protected] Disable the ability to opt-out of `explicit-package-dependencies`. (flutter/flutter#169283) 2025-05-22 [email protected] Fixes tab semantics gets dropped if the child produce a semantics node (flutter/flutter#169233) 2025-05-22 [email protected] Skip `{PLAT}_web_tools_test#expression_evaluation_*_test.dart`, turning tree 🔴 (flutter/flutter#169305) 2025-05-22 [email protected] Update tool-internal `generateLocalizations...()` to never use synthetic (`flutter_gen`) packages (flutter/flutter#169285) 2025-05-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Make `build_android_host_app_with_module_aar` build using an aar (#169171)" (flutter/flutter#169287) 2025-05-22 [email protected] Increase sub-task timeout for `web_tool_tests_1_2` (flutter/flutter#169277) 2025-05-22 [email protected] refactor the usage of `MediaQuery.sizeOf(context).height` to use the new `.heightOf(context)` (flutter/flutter#168894) 2025-05-22 [email protected] [tool] Add --no-minify flag to JS Compiler (flutter/flutter#169102) 2025-05-22 [email protected] Update ButtonStyle documentation (flutter/flutter#168062) 2025-05-22 [email protected] Fix the issue where DropdownMenu disposes of the controller. (flutter/flutter#168541) 2025-05-22 [email protected] Add bottomSheetScrimBuilder to Scaffold (flutter/flutter#167335) 2025-05-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Reland] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#168396) (#168914)" (flutter/flutter#169250) 2025-05-21 [email protected] Roll Dart SDK from 56940edd099d to 8f85d89fdc23 (6 revisions) (flutter/flutter#169237) 2025-05-21 [email protected] Use gestureSettings.touchSlop in PrimaryPointerGestureRecognizer (flutter/flutter#161549) 2025-05-21 [email protected] Normalize BottomAppBarTheme (continue) (flutter/flutter#168966) 2025-05-21 [email protected] [Reland] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#168396) (flutter/flutter#168914) 2025-05-21 [email protected] Respect `calendarDelegate` in `showDateRangePicker` (flutter/flutter#168290) 2025-05-21 [email protected] Make `build_android_host_app_with_module_aar` build using an aar (flutter/flutter#169171) 2025-05-21 [email protected] Roll Dart SDK from 7c40eba6bf77 to 56940edd099d (flutter/flutter#169135) 2025-05-21 [email protected] Feat: Add full screen dialog support for dialog routes (flutter/flutter#167794) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. ...
…r#9315) Roll Flutter from 33cdd8ef31dc to 85564cbba9e7 (39 revisions) flutter/flutter@33cdd8e...85564cb 2025-05-23 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#169276)" (flutter/flutter#169347) 2025-05-23 [email protected] Roll Skia from a01ea49f53a4 to 956fd8b14e22 (1 revision) (flutter/flutter#169334) 2025-05-23 [email protected] Roll Dart SDK from 4de10a11ceb9 to 085f110ecf33 (1 revision) (flutter/flutter#169333) 2025-05-23 [email protected] Roll Skia from bcc7e7fce10e to a01ea49f53a4 (1 revision) (flutter/flutter#169329) 2025-05-23 [email protected] Roll Skia from 18b85aced9b7 to bcc7e7fce10e (3 revisions) (flutter/flutter#169323) 2025-05-23 [email protected] Roll Dart SDK from 2a45b2f88a4f to 4de10a11ceb9 (2 revisions) (flutter/flutter#169322) 2025-05-23 [email protected] Remove patching of `package_config.json` from Flutter Pub wrapper. (flutter/flutter#169306) 2025-05-23 [email protected] Add missing dart_dynamic_modules flag for iOS DDM simulator builds (flutter/flutter#169254) 2025-05-23 [email protected] Roll Skia from ea73ccdc1417 to 18b85aced9b7 (6 revisions) (flutter/flutter#169315) 2025-05-23 [email protected] Add flag to exclude focus for hidden children in Visibility, maintainFocusability. Set maintainFocusability to false in IndexedStack (flutter/flutter#159133) 2025-05-23 [email protected] [Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (flutter/flutter#169276) 2025-05-23 [email protected] Roll Dart SDK from 8f85d89fdc23 to 2a45b2f88a4f (6 revisions) (flutter/flutter#169312) 2025-05-23 [email protected] Removes unnecessary parentheses (flutter/flutter#169015) 2025-05-22 [email protected] Unpin test/test_core/test_api packages (flutter/flutter#169198) 2025-05-22 [email protected] [Engine] Fix an edge case of RoundSuperellipseParam::Contains with sharp corners (flutter/flutter#167977) 2025-05-22 [email protected] Replace goldens in test/cupertino/nav_bar_transition_test.dart (flutter/flutter#169172) 2025-05-22 [email protected] Roll Skia from 13a299964c9f to ea73ccdc1417 (35 revisions) (flutter/flutter#169303) 2025-05-22 [email protected] Increase sub-task timeout for Mac web_tool_tests (flutter/flutter#169307) 2025-05-22 [email protected] Fix crash on two finger selection gesture (flutter/flutter#168598) 2025-05-22 [email protected] Disable the ability to opt-out of `explicit-package-dependencies`. (flutter/flutter#169283) 2025-05-22 [email protected] Fixes tab semantics gets dropped if the child produce a semantics node (flutter/flutter#169233) 2025-05-22 [email protected] Skip `{PLAT}_web_tools_test#expression_evaluation_*_test.dart`, turning tree 🔴 (flutter/flutter#169305) 2025-05-22 [email protected] Update tool-internal `generateLocalizations...()` to never use synthetic (`flutter_gen`) packages (flutter/flutter#169285) 2025-05-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Make `build_android_host_app_with_module_aar` build using an aar (#169171)" (flutter/flutter#169287) 2025-05-22 [email protected] Increase sub-task timeout for `web_tool_tests_1_2` (flutter/flutter#169277) 2025-05-22 [email protected] refactor the usage of `MediaQuery.sizeOf(context).height` to use the new `.heightOf(context)` (flutter/flutter#168894) 2025-05-22 [email protected] [tool] Add --no-minify flag to JS Compiler (flutter/flutter#169102) 2025-05-22 [email protected] Update ButtonStyle documentation (flutter/flutter#168062) 2025-05-22 [email protected] Fix the issue where DropdownMenu disposes of the controller. (flutter/flutter#168541) 2025-05-22 [email protected] Add bottomSheetScrimBuilder to Scaffold (flutter/flutter#167335) 2025-05-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Reland] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#168396) (#168914)" (flutter/flutter#169250) 2025-05-21 [email protected] Roll Dart SDK from 56940edd099d to 8f85d89fdc23 (6 revisions) (flutter/flutter#169237) 2025-05-21 [email protected] Use gestureSettings.touchSlop in PrimaryPointerGestureRecognizer (flutter/flutter#161549) 2025-05-21 [email protected] Normalize BottomAppBarTheme (continue) (flutter/flutter#168966) 2025-05-21 [email protected] [Reland] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#168396) (flutter/flutter#168914) 2025-05-21 [email protected] Respect `calendarDelegate` in `showDateRangePicker` (flutter/flutter#168290) 2025-05-21 [email protected] Make `build_android_host_app_with_module_aar` build using an aar (flutter/flutter#169171) 2025-05-21 [email protected] Roll Dart SDK from 7c40eba6bf77 to 56940edd099d (flutter/flutter#169135) 2025-05-21 [email protected] Feat: Add full screen dialog support for dialog routes (flutter/flutter#167794) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. ...
…r#9315) Roll Flutter from 33cdd8ef31dc to 85564cbba9e7 (39 revisions) flutter/flutter@33cdd8e...85564cb 2025-05-23 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#169276)" (flutter/flutter#169347) 2025-05-23 [email protected] Roll Skia from a01ea49f53a4 to 956fd8b14e22 (1 revision) (flutter/flutter#169334) 2025-05-23 [email protected] Roll Dart SDK from 4de10a11ceb9 to 085f110ecf33 (1 revision) (flutter/flutter#169333) 2025-05-23 [email protected] Roll Skia from bcc7e7fce10e to a01ea49f53a4 (1 revision) (flutter/flutter#169329) 2025-05-23 [email protected] Roll Skia from 18b85aced9b7 to bcc7e7fce10e (3 revisions) (flutter/flutter#169323) 2025-05-23 [email protected] Roll Dart SDK from 2a45b2f88a4f to 4de10a11ceb9 (2 revisions) (flutter/flutter#169322) 2025-05-23 [email protected] Remove patching of `package_config.json` from Flutter Pub wrapper. (flutter/flutter#169306) 2025-05-23 [email protected] Add missing dart_dynamic_modules flag for iOS DDM simulator builds (flutter/flutter#169254) 2025-05-23 [email protected] Roll Skia from ea73ccdc1417 to 18b85aced9b7 (6 revisions) (flutter/flutter#169315) 2025-05-23 [email protected] Add flag to exclude focus for hidden children in Visibility, maintainFocusability. Set maintainFocusability to false in IndexedStack (flutter/flutter#159133) 2025-05-23 [email protected] [Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (flutter/flutter#169276) 2025-05-23 [email protected] Roll Dart SDK from 8f85d89fdc23 to 2a45b2f88a4f (6 revisions) (flutter/flutter#169312) 2025-05-23 [email protected] Removes unnecessary parentheses (flutter/flutter#169015) 2025-05-22 [email protected] Unpin test/test_core/test_api packages (flutter/flutter#169198) 2025-05-22 [email protected] [Engine] Fix an edge case of RoundSuperellipseParam::Contains with sharp corners (flutter/flutter#167977) 2025-05-22 [email protected] Replace goldens in test/cupertino/nav_bar_transition_test.dart (flutter/flutter#169172) 2025-05-22 [email protected] Roll Skia from 13a299964c9f to ea73ccdc1417 (35 revisions) (flutter/flutter#169303) 2025-05-22 [email protected] Increase sub-task timeout for Mac web_tool_tests (flutter/flutter#169307) 2025-05-22 [email protected] Fix crash on two finger selection gesture (flutter/flutter#168598) 2025-05-22 [email protected] Disable the ability to opt-out of `explicit-package-dependencies`. (flutter/flutter#169283) 2025-05-22 [email protected] Fixes tab semantics gets dropped if the child produce a semantics node (flutter/flutter#169233) 2025-05-22 [email protected] Skip `{PLAT}_web_tools_test#expression_evaluation_*_test.dart`, turning tree 🔴 (flutter/flutter#169305) 2025-05-22 [email protected] Update tool-internal `generateLocalizations...()` to never use synthetic (`flutter_gen`) packages (flutter/flutter#169285) 2025-05-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Make `build_android_host_app_with_module_aar` build using an aar (#169171)" (flutter/flutter#169287) 2025-05-22 [email protected] Increase sub-task timeout for `web_tool_tests_1_2` (flutter/flutter#169277) 2025-05-22 [email protected] refactor the usage of `MediaQuery.sizeOf(context).height` to use the new `.heightOf(context)` (flutter/flutter#168894) 2025-05-22 [email protected] [tool] Add --no-minify flag to JS Compiler (flutter/flutter#169102) 2025-05-22 [email protected] Update ButtonStyle documentation (flutter/flutter#168062) 2025-05-22 [email protected] Fix the issue where DropdownMenu disposes of the controller. (flutter/flutter#168541) 2025-05-22 [email protected] Add bottomSheetScrimBuilder to Scaffold (flutter/flutter#167335) 2025-05-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Reland] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#168396) (#168914)" (flutter/flutter#169250) 2025-05-21 [email protected] Roll Dart SDK from 56940edd099d to 8f85d89fdc23 (6 revisions) (flutter/flutter#169237) 2025-05-21 [email protected] Use gestureSettings.touchSlop in PrimaryPointerGestureRecognizer (flutter/flutter#161549) 2025-05-21 [email protected] Normalize BottomAppBarTheme (continue) (flutter/flutter#168966) 2025-05-21 [email protected] [Reland] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#168396) (flutter/flutter#168914) 2025-05-21 [email protected] Respect `calendarDelegate` in `showDateRangePicker` (flutter/flutter#168290) 2025-05-21 [email protected] Make `build_android_host_app_with_module_aar` build using an aar (flutter/flutter#169171) 2025-05-21 [email protected] Roll Dart SDK from 7c40eba6bf77 to 56940edd099d (flutter/flutter#169135) 2025-05-21 [email protected] Feat: Add full screen dialog support for dialog routes (flutter/flutter#167794) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. ...
Description
This PR updates
ButtonStyle.minimumSizeandButtonStyle.fixedSizedocumentation.It updates the documentation in order to describe the current behavior as it might be surprising.
I have considered changing the behavior related to
ButtonStyle.minimumSizebut while experimenting I noticed that several widgets in the framework (and several tests) useButtonStyle.minimumSizewith the expectation that the given size is adjusted based on the ambient visual density (and there are probably several similar usages outside of the framework in Google and non-Google apps).Related Issue
ButtonStyle.minimumSize : Fixes minimumSize not respected properly when visual density is not standard
ButtonStyle.fixedSize : Fixes Button behaves differently in Web/Desktop and Mobile
Tests
Documentation only