Skip to content

Commit 4715216

Browse files
authored
Revert "Introduce tone-based surfaces and accent color add-ons - Part 2" (#143973)
Reverts flutter/flutter#138521
1 parent 1653592 commit 4715216

File tree

181 files changed

+999
-2520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+999
-2520
lines changed

dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class Cards extends StatelessWidget {
443443
SizedBox(
444444
width: cardWidth,
445445
child: Card(
446-
color: Theme.of(context).colorScheme.surfaceContainerHighest,
446+
color: Theme.of(context).colorScheme.surfaceVariant,
447447
elevation: 0,
448448
child: Container(
449449
padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
@@ -1279,7 +1279,7 @@ class _IconToggleButtonState extends State<IconToggleButton> {
12791279
ButtonStyle enabledFilledButtonStyle(bool selected, ColorScheme colors) {
12801280
return IconButton.styleFrom(
12811281
foregroundColor: selected ? colors.onPrimary : colors.primary,
1282-
backgroundColor: selected ? colors.primary : colors.surfaceContainerHighest,
1282+
backgroundColor: selected ? colors.primary : colors.surfaceVariant,
12831283
disabledForegroundColor: colors.onSurface.withOpacity(0.38),
12841284
disabledBackgroundColor: colors.onSurface.withOpacity(0.12),
12851285
hoverColor: selected
@@ -1306,7 +1306,7 @@ ButtonStyle enabledFilledTonalButtonStyle(bool selected, ColorScheme colors) {
13061306
foregroundColor:
13071307
selected ? colors.onSecondaryContainer : colors.onSurfaceVariant,
13081308
backgroundColor:
1309-
selected ? colors.secondaryContainer : colors.surfaceContainerHighest,
1309+
selected ? colors.secondaryContainer : colors.surfaceVariant,
13101310
hoverColor: selected
13111311
? colors.onSecondaryContainer.withOpacity(0.08)
13121312
: colors.onSurfaceVariant.withOpacity(0.08),
@@ -2350,7 +2350,7 @@ class ComponentGroupDecoration extends StatelessWidget {
23502350
child: Card(
23512351
margin: EdgeInsets.zero,
23522352
elevation: 0,
2353-
color: Theme.of(context).colorScheme.surfaceContainerHighest.withOpacity(0.3),
2353+
color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.3),
23542354
child: Padding(
23552355
padding: const EdgeInsets.symmetric(vertical: 20.0),
23562356
child: Center(

dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class KeyPad extends StatelessWidget {
202202
),
203203
Expanded(
204204
child: Material(
205-
color: themeData.colorScheme.surface,
205+
color: themeData.colorScheme.background,
206206
child: Column(
207207
children: <Widget>[
208208
CalcKey('\u232B', calcState!.handleDelTap),

dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class _ChipDemoState extends State<ChipDemo> {
203203
assert(name.length > 1);
204204
final int hash = name.hashCode & 0xffff;
205205
final double hue = (360.0 * hash / (1 << 15)) % 360.0;
206-
final double themeValue = HSVColor.fromColor(theme.colorScheme.surface).value;
206+
final double themeValue = HSVColor.fromColor(theme.colorScheme.background).value;
207207
return HSVColor.fromAHSV(1.0, hue, 0.4, themeValue).toColor();
208208
}
209209

dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ const ColorScheme kShrineColorScheme = ColorScheme(
114114
primary: kShrinePink100,
115115
secondary: kShrinePink50,
116116
surface: kShrineSurfaceWhite,
117+
background: kShrineBackgroundWhite,
117118
error: kShrineErrorRed,
118119
onPrimary: kShrineBrown900,
119120
onSecondary: kShrineBrown900,
120121
onSurface: kShrineBrown900,
122+
onBackground: kShrineBrown900,
121123
onError: kShrineSurfaceWhite,
122124
brightness: Brightness.light,
123125
);

dev/integration_tests/flutter_gallery/lib/gallery/themes.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ThemeData _buildDarkTheme() {
2323
secondary: secondaryColor,
2424
onPrimary: Colors.white,
2525
error: const Color(0xFFB00020),
26-
surface: const Color(0xFF202124),
26+
background: const Color(0xFF202124),
2727
);
2828
final ThemeData base = ThemeData(
2929
useMaterial3: false,

dev/tools/gen_defaults/data/badge.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "v0_206",
2+
"version": "v0_162",
33

44
"md.comp.badge.color": "error",
55
"md.comp.badge.large.color": "error",

dev/tools/gen_defaults/data/banner.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"version": "v0_206",
2+
"version": "v0_162",
33

4-
"md.comp.banner.container.color": "surfaceContainerLow",
4+
"md.comp.banner.container.color": "surface",
55
"md.comp.banner.container.elevation": "md.sys.elevation.level1",
66
"md.comp.banner.container.shape": "md.sys.shape.corner.none",
7+
"md.comp.banner.container.surface-tint-layer.color": "surfaceTint",
78
"md.comp.banner.desktop.with-single-line.container.height": 52.0,
89
"md.comp.banner.desktop.with-three-lines.container.height": 90.0,
910
"md.comp.banner.desktop.with-two-lines.with-image.container.height": 72.0,
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"version": "v0_206",
2+
"version": "v0_162",
33

4-
"md.comp.bottom-app-bar.container.color": "surfaceContainer",
4+
"md.comp.bottom-app-bar.container.color": "surface",
55
"md.comp.bottom-app-bar.container.elevation": "md.sys.elevation.level2",
66
"md.comp.bottom-app-bar.container.height": 80.0,
7-
"md.comp.bottom-app-bar.container.shape": "md.sys.shape.corner.none"
7+
"md.comp.bottom-app-bar.container.shape": "md.sys.shape.corner.none",
8+
"md.comp.bottom-app-bar.container.surface-tint-layer.color": "surfaceTint"
89
}

dev/tools/gen_defaults/data/button_elevated.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
{
2-
"version": "v0_206",
2+
"version": "v0_162",
33

4-
"md.comp.elevated-button.container.color": "surfaceContainerLow",
4+
"md.comp.elevated-button.container.color": "surface",
55
"md.comp.elevated-button.container.elevation": "md.sys.elevation.level1",
66
"md.comp.elevated-button.container.height": 40.0,
77
"md.comp.elevated-button.container.shadow-color": "shadow",
88
"md.comp.elevated-button.container.shape": "md.sys.shape.corner.full",
9+
"md.comp.elevated-button.container.surface-tint-layer.color": "surfaceTint",
910
"md.comp.elevated-button.disabled.container.color": "onSurface",
1011
"md.comp.elevated-button.disabled.container.elevation": "md.sys.elevation.level0",
1112
"md.comp.elevated-button.disabled.container.opacity": 0.12,
1213
"md.comp.elevated-button.disabled.label-text.color": "onSurface",
1314
"md.comp.elevated-button.disabled.label-text.opacity": 0.38,
1415
"md.comp.elevated-button.focus.container.elevation": "md.sys.elevation.level1",
15-
"md.comp.elevated-button.focus.indicator.color": "secondary",
16-
"md.comp.elevated-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
17-
"md.comp.elevated-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
1816
"md.comp.elevated-button.focus.label-text.color": "primary",
1917
"md.comp.elevated-button.focus.state-layer.color": "primary",
2018
"md.comp.elevated-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",

dev/tools/gen_defaults/data/button_filled.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "v0_206",
2+
"version": "v0_162",
33

44
"md.comp.filled-button.container.color": "primary",
55
"md.comp.filled-button.container.elevation": "md.sys.elevation.level0",
@@ -12,9 +12,6 @@
1212
"md.comp.filled-button.disabled.label-text.color": "onSurface",
1313
"md.comp.filled-button.disabled.label-text.opacity": 0.38,
1414
"md.comp.filled-button.focus.container.elevation": "md.sys.elevation.level0",
15-
"md.comp.filled-button.focus.indicator.color": "secondary",
16-
"md.comp.filled-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
17-
"md.comp.filled-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
1815
"md.comp.filled-button.focus.label-text.color": "onPrimary",
1916
"md.comp.filled-button.focus.state-layer.color": "onPrimary",
2017
"md.comp.filled-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",

0 commit comments

Comments
 (0)