@@ -21,6 +21,8 @@ import 'text_button.dart';
2121import 'text_button_theme.dart' ;
2222import 'theme.dart' ;
2323
24+ part 'generated/snackbar_defaults_m3.g.dart' ;
25+
2426// Examples can assume:
2527// late BuildContext context;
2628
@@ -947,74 +949,3 @@ class _SnackbarDefaultsM2 extends SnackBarThemeData {
947949 @override
948950 double get actionOverflowThreshold => 0.25 ;
949951}
950-
951- // BEGIN GENERATED TOKEN PROPERTIES - Snackbar
952-
953- // Do not edit by hand. The code between the "BEGIN GENERATED" and
954- // "END GENERATED" comments are generated from data in the Material
955- // Design token database by the script:
956- // dev/tools/gen_defaults/bin/gen_defaults.dart.
957-
958- // dart format off
959- class _SnackbarDefaultsM3 extends SnackBarThemeData {
960- _SnackbarDefaultsM3 (this .context);
961-
962- final BuildContext context;
963- late final ThemeData _theme = Theme .of (context);
964- late final ColorScheme _colors = _theme.colorScheme;
965-
966- @override
967- Color get backgroundColor => _colors.inverseSurface;
968-
969- @override
970- Color get actionTextColor => WidgetStateColor .resolveWith ((Set <WidgetState > states) {
971- if (states.contains (WidgetState .disabled)) {
972- return _colors.inversePrimary;
973- }
974- if (states.contains (WidgetState .pressed)) {
975- return _colors.inversePrimary;
976- }
977- if (states.contains (WidgetState .hovered)) {
978- return _colors.inversePrimary;
979- }
980- if (states.contains (WidgetState .focused)) {
981- return _colors.inversePrimary;
982- }
983- return _colors.inversePrimary;
984- });
985-
986- @override
987- Color get disabledActionTextColor =>
988- _colors.inversePrimary;
989-
990-
991- @override
992- TextStyle get contentTextStyle =>
993- Theme .of (context).textTheme.bodyMedium! .copyWith
994- (color: _colors.onInverseSurface,
995- );
996-
997- @override
998- double get elevation => 6.0 ;
999-
1000- @override
1001- ShapeBorder get shape => const RoundedRectangleBorder (borderRadius: BorderRadius .all (Radius .circular (4.0 )));
1002-
1003- @override
1004- SnackBarBehavior get behavior => SnackBarBehavior .fixed;
1005-
1006- @override
1007- EdgeInsets get insetPadding => const EdgeInsets .fromLTRB (15.0 , 5.0 , 15.0 , 10.0 );
1008-
1009- @override
1010- bool get showCloseIcon => false ;
1011-
1012- @override
1013- Color ? get closeIconColor => _colors.onInverseSurface;
1014-
1015- @override
1016- double get actionOverflowThreshold => 0.25 ;
1017- }
1018- // dart format on
1019-
1020- // END GENERATED TOKEN PROPERTIES - Snackbar
0 commit comments