flutter/dev/tools/gen_defaults/lib
Greg Spencer 51ed348f3b
Fix handling of iconSize and iconColor defaults for ButtonStyleButton subclasses. (#143501)
## Description

Adds defaults that use tokens to define default `iconSize` and `iconColor` values. Previously, the Material 3 token values for button icon sizes and colors were not being used as defaults when the `ButtonStyleButton.defaultStyleOf` function returned the default values.

Adds tests to make sure appropriate `ButtonStyle` fields are populated when defaultStyle is called on buttons.

Updated documentation for `defaultStyleOf` to indicated that not _all_ fields need to be non-null, since some fields make sense to be null (e.g. `fixedSize`) because they would otherwise override the behavior of other fields in the same `ButtonStyle`.

## Tests
 - Added tests to make sure that the appropriate fields are non-null in the default button styles for each type of button.
2024-08-02 23:31:07 +00:00
..
action_chip_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
app_bar_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
badge_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
banner_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
bottom_app_bar_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
bottom_sheet_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
button_template.dart Fix handling of iconSize and iconColor defaults for ButtonStyleButton subclasses. (#143501) 2024-08-02 23:31:07 +00:00
card_template.dart Normalize Card theme (#151914) 2024-07-29 16:48:06 +00:00
checkbox_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
chip_template.dart Fix token usages on Regular Chip and Action Chip (#141701) 2024-02-01 00:05:22 +00:00
color_scheme_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
date_picker_template.dart Fix CalendarDatePicker day selection shape and overlay (#144317) 2024-03-01 12:44:29 +00:00
dialog_template.dart Add clipBehavior to DialogTheme (#147635) 2024-05-10 22:08:59 +00:00
divider_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
drawer_template.dart Add clipBehavior to DrawerThemeData (#148061) 2024-05-15 18:37:07 +00:00
expansion_tile_template.dart Reland "Update ExpansionTile to support Material 3 & add an example" (#121212) 2023-02-24 06:30:33 -08:00
fab_template.dart Update tokens to v2.3.5 (#145356) 2024-03-28 22:22:20 +00:00
filter_chip_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
icon_button_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
input_chip_template.dart M3 - Fix Chip icon and label colors (#140573) 2024-01-30 16:28:31 -08:00
input_decorator_template.dart Reland fix inputDecorator hint color on M3 (#150278) 2024-06-25 21:42:59 +00:00
list_tile_template.dart Update ListTile text defaults to use ColorScheme (#128581) 2023-06-12 14:52:06 +00:00
menu_template.dart Fix handling of iconSize and iconColor defaults for ButtonStyleButton subclasses. (#143501) 2024-08-02 23:31:07 +00:00
motion_template.dart Add support for M3 motion (#129942) 2023-07-19 22:07:59 +02:00
navigation_bar_template.dart Add Card.filled and Card.outlined factory methods (#136229) 2023-11-01 23:29:49 +00:00
navigation_drawer_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
navigation_rail_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
popup_menu_template.dart Make popup menu hardcoded padding configurable (#150506) 2024-06-20 19:18:21 +00:00
progress_indicator_template.dart Update tokens to v2.3.5 (#145356) 2024-03-28 22:22:20 +00:00
radio_template.dart Update Radio button to material 3 (#111774) 2022-09-20 14:09:20 -07:00
search_bar_template.dart Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
search_view_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
segmented_button_template.dart Add missing overlayColor property in styleFrom methods (#146685) 2024-04-24 11:56:32 +00:00
slider_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
snackbar_template.dart Cleanup M3 token templates for theme lookups (#122601) 2023-03-14 17:01:13 +00:00
surface_tint.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
switch_template.dart Introduce Switch.padding (#149884) 2024-07-16 20:25:09 +00:00
tabs_template.dart Update TabBar and TabBar.secondary to use indicator height/color M3 tokens (#145753) 2024-03-28 17:56:09 +00:00
template.dart Fix signature for TokenTemplate.updateFile (#149673) 2024-06-05 20:51:06 +00:00
text_field_template.dart TextField should support disabled input text style (#119216) 2023-03-17 10:09:49 -07:00
time_picker_template.dart Update hourMinuteTextStyle defaults for Material 3 Time Picker (#143749) 2024-02-21 10:39:35 +00:00
token_logger.dart Relax the warning of unavailable tokens in gen_defaults when a default value is provided (#140872) 2024-01-23 09:35:22 +00:00
typography_template.dart Add missing parameter to TableBorder.symmetric, and improve class constructors (#144279) 2024-03-04 20:20:19 +00:00