Skip to content

Commit

Permalink
Added tokens for Snackbar widget. (flutter#114466)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenaustin committed Nov 2, 2022
1 parent 475ccd4 commit 89418ef
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dev/tools/gen_defaults/bin/gen_defaults.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Map<String, dynamic> _readTokenFile(String fileName) {
Future<void> main(List<String> args) async {
const String materialLib = 'packages/flutter/lib/src/material';
const List<String> tokenFiles = <String>[
'badge.json',
'banner.json',
'bottom_app_bar.json',
'button_elevated.json',
Expand All @@ -72,8 +73,8 @@ Future<void> main(List<String> args) async {
'date_picker_docked.json',
'date_picker_modal.json',
'dialog.json',
'divider.json',
'dialog_fullscreen.json',
'divider.json',
'elevation.json',
'fab_extended_primary.json',
'fab_large_primary.json',
Expand All @@ -83,11 +84,13 @@ Future<void> main(List<String> args) async {
'icon_button_filled.json',
'icon_button_filled_tonal.json',
'icon_button_outlined.json',
'list.json',
'menu.json',
'motion.json',
'navigation_bar.json',
'navigation_drawer.json',
'navigation_rail.json',
'navigation_tab_primary.json',
'palette.json',
'progress_indicator_circular.json',
'progress_indicator_linear.json',
Expand All @@ -96,6 +99,7 @@ Future<void> main(List<String> args) async {
'shape.json',
'sheet_bottom.json',
'slider.json',
'snackbar.json',
'state.json',
'switch.json',
'text_field_filled.json',
Expand Down
34 changes: 34 additions & 0 deletions dev/tools/gen_defaults/data/snackbar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"version": "v0_137",

"md.comp.snackbar.action.focus.label-text.color": "inversePrimary",
"md.comp.snackbar.action.focus.state-layer.color": "inversePrimary",
"md.comp.snackbar.action.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.snackbar.action.hover.label-text.color": "inversePrimary",
"md.comp.snackbar.action.hover.state-layer.color": "inversePrimary",
"md.comp.snackbar.action.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.snackbar.action.label-text.color": "inversePrimary",
"md.comp.snackbar.action.label-text.text-style": "labelLarge",
"md.comp.snackbar.action.pressed.label-text.color": "inversePrimary",
"md.comp.snackbar.action.pressed.state-layer.color": "inversePrimary",
"md.comp.snackbar.action.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.snackbar.container.color": "inverseSurface",
"md.comp.snackbar.container.elevation": "md.sys.elevation.level3",
"md.comp.snackbar.container.shadow-color": "shadow",
"md.comp.snackbar.container.shape": "md.sys.shape.corner.extra-small",
"md.comp.snackbar.icon.color": "inverseOnSurface",
"md.comp.snackbar.icon.focus.icon.color": "inverseOnSurface",
"md.comp.snackbar.icon.focus.state-layer.color": "inverseOnSurface",
"md.comp.snackbar.icon.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.snackbar.icon.hover.icon.color": "inverseOnSurface",
"md.comp.snackbar.icon.hover.state-layer.color": "inverseOnSurface",
"md.comp.snackbar.icon.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.snackbar.icon.pressed.icon.color": "inverseOnSurface",
"md.comp.snackbar.icon.pressed.state-layer.color": "inverseOnSurface",
"md.comp.snackbar.icon.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.snackbar.icon.size": 24.0,
"md.comp.snackbar.supporting-text.color": "inverseOnSurface",
"md.comp.snackbar.supporting-text.text-style": "bodyMedium",
"md.comp.snackbar.with-single-line.container.height": 48.0,
"md.comp.snackbar.with-two-lines.container.height": 68.0
}

0 comments on commit 89418ef

Please sign in to comment.