Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273)
diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart
index 58ad370..728fdf8 100644
--- a/dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart
+++ b/dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart
@@ -443,7 +443,7 @@
SizedBox(
width: cardWidth,
child: Card(
- color: Theme.of(context).colorScheme.surfaceVariant,
+ color: Theme.of(context).colorScheme.surfaceContainerHighest,
elevation: 0,
child: Container(
padding: const EdgeInsets.fromLTRB(10, 5, 5, 10),
@@ -1279,7 +1279,7 @@
ButtonStyle enabledFilledButtonStyle(bool selected, ColorScheme colors) {
return IconButton.styleFrom(
foregroundColor: selected ? colors.onPrimary : colors.primary,
- backgroundColor: selected ? colors.primary : colors.surfaceVariant,
+ backgroundColor: selected ? colors.primary : colors.surfaceContainerHighest,
disabledForegroundColor: colors.onSurface.withOpacity(0.38),
disabledBackgroundColor: colors.onSurface.withOpacity(0.12),
hoverColor: selected
@@ -1306,7 +1306,7 @@
foregroundColor:
selected ? colors.onSecondaryContainer : colors.onSurfaceVariant,
backgroundColor:
- selected ? colors.secondaryContainer : colors.surfaceVariant,
+ selected ? colors.secondaryContainer : colors.surfaceContainerHighest,
hoverColor: selected
? colors.onSecondaryContainer.withOpacity(0.08)
: colors.onSurfaceVariant.withOpacity(0.08),
@@ -2350,7 +2350,7 @@
child: Card(
margin: EdgeInsets.zero,
elevation: 0,
- color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.3),
+ color: Theme.of(context).colorScheme.surfaceContainerHighest.withOpacity(0.3),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 20.0),
child: Center(
diff --git a/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart b/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart
index 239526c..58adcb5 100644
--- a/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart
+++ b/dev/integration_tests/flutter_gallery/lib/demo/calculator/home.dart
@@ -202,7 +202,7 @@
),
Expanded(
child: Material(
- color: themeData.colorScheme.background,
+ color: themeData.colorScheme.surface,
child: Column(
children: <Widget>[
CalcKey('\u232B', calcState!.handleDelTap),
diff --git a/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart b/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart
index 19188dc..ba561bc 100644
--- a/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart
+++ b/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart
@@ -203,7 +203,7 @@
assert(name.length > 1);
final int hash = name.hashCode & 0xffff;
final double hue = (360.0 * hash / (1 << 15)) % 360.0;
- final double themeValue = HSVColor.fromColor(theme.colorScheme.background).value;
+ final double themeValue = HSVColor.fromColor(theme.colorScheme.surface).value;
return HSVColor.fromAHSV(1.0, hue, 0.4, themeValue).toColor();
}
diff --git a/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart b/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart
index 0b4ff75..c825b0b 100644
--- a/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart
+++ b/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart
@@ -114,12 +114,10 @@
primary: kShrinePink100,
secondary: kShrinePink50,
surface: kShrineSurfaceWhite,
- background: kShrineBackgroundWhite,
error: kShrineErrorRed,
onPrimary: kShrineBrown900,
onSecondary: kShrineBrown900,
onSurface: kShrineBrown900,
- onBackground: kShrineBrown900,
onError: kShrineSurfaceWhite,
brightness: Brightness.light,
);
diff --git a/dev/integration_tests/flutter_gallery/lib/gallery/themes.dart b/dev/integration_tests/flutter_gallery/lib/gallery/themes.dart
index dbaefed..2c0e475 100644
--- a/dev/integration_tests/flutter_gallery/lib/gallery/themes.dart
+++ b/dev/integration_tests/flutter_gallery/lib/gallery/themes.dart
@@ -23,7 +23,7 @@
secondary: secondaryColor,
onPrimary: Colors.white,
error: const Color(0xFFB00020),
- background: const Color(0xFF202124),
+ surface: const Color(0xFF202124),
);
final ThemeData base = ThemeData(
useMaterial3: false,
diff --git a/dev/tools/gen_defaults/data/badge.json b/dev/tools/gen_defaults/data/badge.json
index 471707b..06ca3ef 100644
--- a/dev/tools/gen_defaults/data/badge.json
+++ b/dev/tools/gen_defaults/data/badge.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.badge.color": "error",
"md.comp.badge.large.color": "error",
diff --git a/dev/tools/gen_defaults/data/banner.json b/dev/tools/gen_defaults/data/banner.json
index 728016c..34077c6 100644
--- a/dev/tools/gen_defaults/data/banner.json
+++ b/dev/tools/gen_defaults/data/banner.json
@@ -1,10 +1,9 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.banner.container.color": "surface",
+ "md.comp.banner.container.color": "surfaceContainerLow",
"md.comp.banner.container.elevation": "md.sys.elevation.level1",
"md.comp.banner.container.shape": "md.sys.shape.corner.none",
- "md.comp.banner.container.surface-tint-layer.color": "surfaceTint",
"md.comp.banner.desktop.with-single-line.container.height": 52.0,
"md.comp.banner.desktop.with-three-lines.container.height": 90.0,
"md.comp.banner.desktop.with-two-lines.with-image.container.height": 72.0,
diff --git a/dev/tools/gen_defaults/data/bottom_app_bar.json b/dev/tools/gen_defaults/data/bottom_app_bar.json
index 1d515d3..7270ab7 100644
--- a/dev/tools/gen_defaults/data/bottom_app_bar.json
+++ b/dev/tools/gen_defaults/data/bottom_app_bar.json
@@ -1,9 +1,8 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.bottom-app-bar.container.color": "surface",
+ "md.comp.bottom-app-bar.container.color": "surfaceContainer",
"md.comp.bottom-app-bar.container.elevation": "md.sys.elevation.level2",
"md.comp.bottom-app-bar.container.height": 80.0,
- "md.comp.bottom-app-bar.container.shape": "md.sys.shape.corner.none",
- "md.comp.bottom-app-bar.container.surface-tint-layer.color": "surfaceTint"
+ "md.comp.bottom-app-bar.container.shape": "md.sys.shape.corner.none"
}
diff --git a/dev/tools/gen_defaults/data/button_elevated.json b/dev/tools/gen_defaults/data/button_elevated.json
index abac970..88a9708 100644
--- a/dev/tools/gen_defaults/data/button_elevated.json
+++ b/dev/tools/gen_defaults/data/button_elevated.json
@@ -1,18 +1,20 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.elevated-button.container.color": "surface",
+ "md.comp.elevated-button.container.color": "surfaceContainerLow",
"md.comp.elevated-button.container.elevation": "md.sys.elevation.level1",
"md.comp.elevated-button.container.height": 40.0,
"md.comp.elevated-button.container.shadow-color": "shadow",
"md.comp.elevated-button.container.shape": "md.sys.shape.corner.full",
- "md.comp.elevated-button.container.surface-tint-layer.color": "surfaceTint",
"md.comp.elevated-button.disabled.container.color": "onSurface",
"md.comp.elevated-button.disabled.container.elevation": "md.sys.elevation.level0",
"md.comp.elevated-button.disabled.container.opacity": 0.12,
"md.comp.elevated-button.disabled.label-text.color": "onSurface",
"md.comp.elevated-button.disabled.label-text.opacity": 0.38,
"md.comp.elevated-button.focus.container.elevation": "md.sys.elevation.level1",
+ "md.comp.elevated-button.focus.indicator.color": "secondary",
+ "md.comp.elevated-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.elevated-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.elevated-button.focus.label-text.color": "primary",
"md.comp.elevated-button.focus.state-layer.color": "primary",
"md.comp.elevated-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/button_filled.json b/dev/tools/gen_defaults/data/button_filled.json
index 3720b26..b0e5b01 100644
--- a/dev/tools/gen_defaults/data/button_filled.json
+++ b/dev/tools/gen_defaults/data/button_filled.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.filled-button.container.color": "primary",
"md.comp.filled-button.container.elevation": "md.sys.elevation.level0",
@@ -12,6 +12,9 @@
"md.comp.filled-button.disabled.label-text.color": "onSurface",
"md.comp.filled-button.disabled.label-text.opacity": 0.38,
"md.comp.filled-button.focus.container.elevation": "md.sys.elevation.level0",
+ "md.comp.filled-button.focus.indicator.color": "secondary",
+ "md.comp.filled-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.filled-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.filled-button.focus.label-text.color": "onPrimary",
"md.comp.filled-button.focus.state-layer.color": "onPrimary",
"md.comp.filled-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/button_filled_tonal.json b/dev/tools/gen_defaults/data/button_filled_tonal.json
index badbe27..a084860 100644
--- a/dev/tools/gen_defaults/data/button_filled_tonal.json
+++ b/dev/tools/gen_defaults/data/button_filled_tonal.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.filled-tonal-button.container.color": "secondaryContainer",
"md.comp.filled-tonal-button.container.elevation": "md.sys.elevation.level0",
@@ -12,6 +12,9 @@
"md.comp.filled-tonal-button.disabled.label-text.color": "onSurface",
"md.comp.filled-tonal-button.disabled.label-text.opacity": 0.38,
"md.comp.filled-tonal-button.focus.container.elevation": "md.sys.elevation.level0",
+ "md.comp.filled-tonal-button.focus.indicator.color": "secondary",
+ "md.comp.filled-tonal-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.filled-tonal-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.filled-tonal-button.focus.label-text.color": "onSecondaryContainer",
"md.comp.filled-tonal-button.focus.state-layer.color": "onSecondaryContainer",
"md.comp.filled-tonal-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/button_outlined.json b/dev/tools/gen_defaults/data/button_outlined.json
index 897b0aa..ffe6b2b 100644
--- a/dev/tools/gen_defaults/data/button_outlined.json
+++ b/dev/tools/gen_defaults/data/button_outlined.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.outlined-button.container.height": 40.0,
"md.comp.outlined-button.container.shape": "md.sys.shape.corner.full",
@@ -7,6 +7,9 @@
"md.comp.outlined-button.disabled.label-text.opacity": 0.38,
"md.comp.outlined-button.disabled.outline.color": "onSurface",
"md.comp.outlined-button.disabled.outline.opacity": 0.12,
+ "md.comp.outlined-button.focus.indicator.color": "secondary",
+ "md.comp.outlined-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.outlined-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.outlined-button.focus.label-text.color": "primary",
"md.comp.outlined-button.focus.outline.color": "primary",
"md.comp.outlined-button.focus.state-layer.color": "primary",
diff --git a/dev/tools/gen_defaults/data/button_text.json b/dev/tools/gen_defaults/data/button_text.json
index 4d05e24..24d527c 100644
--- a/dev/tools/gen_defaults/data/button_text.json
+++ b/dev/tools/gen_defaults/data/button_text.json
@@ -1,10 +1,13 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.text-button.container.height": 40.0,
"md.comp.text-button.container.shape": "md.sys.shape.corner.full",
"md.comp.text-button.disabled.label-text.color": "onSurface",
"md.comp.text-button.disabled.label-text.opacity": 0.38,
+ "md.comp.text-button.focus.indicator.color": "secondary",
+ "md.comp.text-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.text-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.text-button.focus.label-text.color": "primary",
"md.comp.text-button.focus.state-layer.color": "primary",
"md.comp.text-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/card_elevated.json b/dev/tools/gen_defaults/data/card_elevated.json
index 7d071f2..7178e18 100644
--- a/dev/tools/gen_defaults/data/card_elevated.json
+++ b/dev/tools/gen_defaults/data/card_elevated.json
@@ -1,11 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.elevated-card.container.color": "surface",
+ "md.comp.elevated-card.container.color": "surfaceContainerLow",
"md.comp.elevated-card.container.elevation": "md.sys.elevation.level1",
"md.comp.elevated-card.container.shadow-color": "shadow",
"md.comp.elevated-card.container.shape": "md.sys.shape.corner.medium",
- "md.comp.elevated-card.container.surface-tint-layer.color": "surfaceTint",
"md.comp.elevated-card.disabled.container.color": "surface",
"md.comp.elevated-card.disabled.container.elevation": "md.sys.elevation.level1",
"md.comp.elevated-card.disabled.container.opacity": 0.38,
@@ -13,6 +12,9 @@
"md.comp.elevated-card.dragged.state-layer.color": "onSurface",
"md.comp.elevated-card.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.elevated-card.focus.container.elevation": "md.sys.elevation.level1",
+ "md.comp.elevated-card.focus.indicator.color": "secondary",
+ "md.comp.elevated-card.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.elevated-card.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.elevated-card.focus.state-layer.color": "onSurface",
"md.comp.elevated-card.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.elevated-card.hover.container.elevation": "md.sys.elevation.level2",
diff --git a/dev/tools/gen_defaults/data/card_filled.json b/dev/tools/gen_defaults/data/card_filled.json
index aac015e..aaba4ab 100644
--- a/dev/tools/gen_defaults/data/card_filled.json
+++ b/dev/tools/gen_defaults/data/card_filled.json
@@ -1,7 +1,7 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.filled-card.container.color": "surfaceVariant",
+ "md.comp.filled-card.container.color": "surfaceContainerHighest",
"md.comp.filled-card.container.elevation": "md.sys.elevation.level0",
"md.comp.filled-card.container.shadow-color": "shadow",
"md.comp.filled-card.container.shape": "md.sys.shape.corner.medium",
@@ -12,6 +12,9 @@
"md.comp.filled-card.dragged.state-layer.color": "onSurface",
"md.comp.filled-card.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.filled-card.focus.container.elevation": "md.sys.elevation.level0",
+ "md.comp.filled-card.focus.indicator.color": "secondary",
+ "md.comp.filled-card.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.filled-card.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.filled-card.focus.state-layer.color": "onSurface",
"md.comp.filled-card.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.filled-card.hover.container.elevation": "md.sys.elevation.level1",
diff --git a/dev/tools/gen_defaults/data/card_outlined.json b/dev/tools/gen_defaults/data/card_outlined.json
index 8e89596..e257d47 100644
--- a/dev/tools/gen_defaults/data/card_outlined.json
+++ b/dev/tools/gen_defaults/data/card_outlined.json
@@ -1,11 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.outlined-card.container.color": "surface",
"md.comp.outlined-card.container.elevation": "md.sys.elevation.level0",
"md.comp.outlined-card.container.shadow-color": "shadow",
"md.comp.outlined-card.container.shape": "md.sys.shape.corner.medium",
- "md.comp.outlined-card.container.surface-tint-layer.color": "surfaceTint",
"md.comp.outlined-card.disabled.container.elevation": "md.sys.elevation.level0",
"md.comp.outlined-card.disabled.outline.color": "outline",
"md.comp.outlined-card.disabled.outline.opacity": 0.12,
@@ -14,6 +13,9 @@
"md.comp.outlined-card.dragged.state-layer.color": "onSurface",
"md.comp.outlined-card.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.outlined-card.focus.container.elevation": "md.sys.elevation.level0",
+ "md.comp.outlined-card.focus.indicator.color": "secondary",
+ "md.comp.outlined-card.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.outlined-card.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.outlined-card.focus.outline.color": "onSurface",
"md.comp.outlined-card.focus.state-layer.color": "onSurface",
"md.comp.outlined-card.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/carousel_item.json b/dev/tools/gen_defaults/data/carousel_item.json
index 0339df4..397356e 100644
--- a/dev/tools/gen_defaults/data/carousel_item.json
+++ b/dev/tools/gen_defaults/data/carousel_item.json
@@ -1,5 +1,5 @@
{
- "version": "v0_202",
+ "version": "v0_206",
"md.comp.carousel-item.container.color": "surface",
"md.comp.carousel-item.container.elevation": "md.sys.elevation.level0",
@@ -9,6 +9,9 @@
"md.comp.carousel-item.disabled.container.elevation": "md.sys.elevation.level0",
"md.comp.carousel-item.disabled.container.opacity": 0.38,
"md.comp.carousel-item.focus.container.elevation": "md.sys.elevation.level0",
+ "md.comp.carousel-item.focus.indicator.color": "secondary",
+ "md.comp.carousel-item.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.carousel-item.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.carousel-item.focus.state-layer.color": "onSurface",
"md.comp.carousel-item.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.carousel-item.hover.container.elevation": "md.sys.elevation.level1",
diff --git a/dev/tools/gen_defaults/data/checkbox.json b/dev/tools/gen_defaults/data/checkbox.json
index 365abdc..a6432de 100644
--- a/dev/tools/gen_defaults/data/checkbox.json
+++ b/dev/tools/gen_defaults/data/checkbox.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.checkbox.container.size": 18.0,
"md.comp.checkbox.error.focus.state-layer.color": "error",
@@ -8,6 +8,9 @@
"md.comp.checkbox.error.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.checkbox.error.pressed.state-layer.color": "error",
"md.comp.checkbox.error.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
+ "md.comp.checkbox.focus.indicator.color": "secondary",
+ "md.comp.checkbox.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.checkbox.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.checkbox.icon.size": 18.0,
"md.comp.checkbox.selected.container.color": "primary",
"md.comp.checkbox.selected.disabled.container.color": "onSurface",
diff --git a/dev/tools/gen_defaults/data/chip_assist.json b/dev/tools/gen_defaults/data/chip_assist.json
index 25f18ea..b8ecc62 100644
--- a/dev/tools/gen_defaults/data/chip_assist.json
+++ b/dev/tools/gen_defaults/data/chip_assist.json
@@ -1,16 +1,15 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.assist-chip.container.height": 32.0,
"md.comp.assist-chip.container.shape": "md.sys.shape.corner.small",
- "md.comp.assist-chip.container.surface-tint-layer.color": "surfaceTint",
"md.comp.assist-chip.disabled.label-text.color": "onSurface",
"md.comp.assist-chip.disabled.label-text.opacity": 0.38,
"md.comp.assist-chip.dragged.container.elevation": "md.sys.elevation.level4",
"md.comp.assist-chip.dragged.label-text.color": "onSurface",
"md.comp.assist-chip.dragged.state-layer.color": "onSurface",
"md.comp.assist-chip.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
- "md.comp.assist-chip.elevated.container.color": "surface",
+ "md.comp.assist-chip.elevated.container.color": "surfaceContainerLow",
"md.comp.assist-chip.elevated.container.elevation": "md.sys.elevation.level1",
"md.comp.assist-chip.elevated.container.shadow-color": "shadow",
"md.comp.assist-chip.elevated.disabled.container.color": "onSurface",
@@ -25,6 +24,9 @@
"md.comp.assist-chip.flat.focus.outline.color": "onSurface",
"md.comp.assist-chip.flat.outline.color": "outline",
"md.comp.assist-chip.flat.outline.width": 1.0,
+ "md.comp.assist-chip.focus.indicator.color": "secondary",
+ "md.comp.assist-chip.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.assist-chip.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.assist-chip.focus.label-text.color": "onSurface",
"md.comp.assist-chip.focus.state-layer.color": "onSurface",
"md.comp.assist-chip.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/chip_filter.json b/dev/tools/gen_defaults/data/chip_filter.json
index 094f037..7d35106 100644
--- a/dev/tools/gen_defaults/data/chip_filter.json
+++ b/dev/tools/gen_defaults/data/chip_filter.json
@@ -1,9 +1,8 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.filter-chip.container.height": 32.0,
"md.comp.filter-chip.container.shape": "md.sys.shape.corner.small",
- "md.comp.filter-chip.container.surface-tint-layer.color": "surfaceTint",
"md.comp.filter-chip.disabled.label-text.color": "onSurface",
"md.comp.filter-chip.disabled.label-text.opacity": 0.38,
"md.comp.filter-chip.dragged.container.elevation": "md.sys.elevation.level4",
@@ -16,7 +15,7 @@
"md.comp.filter-chip.elevated.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.filter-chip.elevated.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.filter-chip.elevated.selected.container.color": "secondaryContainer",
- "md.comp.filter-chip.elevated.unselected.container.color": "surface",
+ "md.comp.filter-chip.elevated.unselected.container.color": "surfaceContainerLow",
"md.comp.filter-chip.flat.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.flat.disabled.selected.container.color": "onSurface",
"md.comp.filter-chip.flat.disabled.selected.container.opacity": 0.12,
@@ -33,6 +32,9 @@
"md.comp.filter-chip.flat.unselected.outline.color": "outline",
"md.comp.filter-chip.flat.unselected.outline.width": 1.0,
"md.comp.filter-chip.flat.unselected.pressed.container.elevation": "md.sys.elevation.level0",
+ "md.comp.filter-chip.focus.indicator.color": "secondary",
+ "md.comp.filter-chip.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.filter-chip.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.filter-chip.label-text.text-style": "labelLarge",
"md.comp.filter-chip.selected.dragged.label-text.color": "onSecondaryContainer",
"md.comp.filter-chip.selected.dragged.state-layer.color": "onSecondaryContainer",
diff --git a/dev/tools/gen_defaults/data/chip_input.json b/dev/tools/gen_defaults/data/chip_input.json
index 260cab0..80b42b4 100644
--- a/dev/tools/gen_defaults/data/chip_input.json
+++ b/dev/tools/gen_defaults/data/chip_input.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.input-chip.container.elevation": "md.sys.elevation.level0",
"md.comp.input-chip.container.height": 32.0,
@@ -11,6 +11,9 @@
"md.comp.input-chip.disabled.unselected.outline.color": "onSurface",
"md.comp.input-chip.disabled.unselected.outline.opacity": 0.12,
"md.comp.input-chip.dragged.container.elevation": "md.sys.elevation.level4",
+ "md.comp.input-chip.focus.indicator.color": "secondary",
+ "md.comp.input-chip.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.input-chip.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.input-chip.label-text.text-style": "labelLarge",
"md.comp.input-chip.selected.container.color": "secondaryContainer",
"md.comp.input-chip.selected.dragged.label-text.color": "onSecondaryContainer",
diff --git a/dev/tools/gen_defaults/data/chip_suggestion.json b/dev/tools/gen_defaults/data/chip_suggestion.json
index baac7a4..e9c1ecb 100644
--- a/dev/tools/gen_defaults/data/chip_suggestion.json
+++ b/dev/tools/gen_defaults/data/chip_suggestion.json
@@ -1,16 +1,15 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.suggestion-chip.container.height": 32.0,
"md.comp.suggestion-chip.container.shape": "md.sys.shape.corner.small",
- "md.comp.suggestion-chip.container.surface-tint-layer.color": "surfaceTint",
"md.comp.suggestion-chip.disabled.label-text.color": "onSurface",
"md.comp.suggestion-chip.disabled.label-text.opacity": 0.38,
"md.comp.suggestion-chip.dragged.container.elevation": "md.sys.elevation.level4",
"md.comp.suggestion-chip.dragged.label-text.color": "onSurfaceVariant",
"md.comp.suggestion-chip.dragged.state-layer.color": "onSurfaceVariant",
"md.comp.suggestion-chip.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
- "md.comp.suggestion-chip.elevated.container.color": "surface",
+ "md.comp.suggestion-chip.elevated.container.color": "surfaceContainerLow",
"md.comp.suggestion-chip.elevated.container.elevation": "md.sys.elevation.level1",
"md.comp.suggestion-chip.elevated.container.shadow-color": "shadow",
"md.comp.suggestion-chip.elevated.disabled.container.color": "onSurface",
@@ -25,6 +24,9 @@
"md.comp.suggestion-chip.flat.focus.outline.color": "onSurfaceVariant",
"md.comp.suggestion-chip.flat.outline.color": "outline",
"md.comp.suggestion-chip.flat.outline.width": 1.0,
+ "md.comp.suggestion-chip.focus.indicator.color": "secondary",
+ "md.comp.suggestion-chip.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.suggestion-chip.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.suggestion-chip.focus.label-text.color": "onSurfaceVariant",
"md.comp.suggestion-chip.focus.state-layer.color": "onSurfaceVariant",
"md.comp.suggestion-chip.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/color_dark.json b/dev/tools/gen_defaults/data/color_dark.json
index e36a9cc..bed87ae 100644
--- a/dev/tools/gen_defaults/data/color_dark.json
+++ b/dev/tools/gen_defaults/data/color_dark.json
@@ -1,7 +1,7 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.sys.color.background": "md.ref.palette.neutral10",
+ "md.sys.color.background": "md.ref.palette.neutral6",
"md.sys.color.error": "md.ref.palette.error80",
"md.sys.color.error-container": "md.ref.palette.error30",
"md.sys.color.inverse-on-surface": "md.ref.palette.neutral20",
@@ -36,7 +36,7 @@
"md.sys.color.secondary-fixed": "md.ref.palette.secondary90",
"md.sys.color.secondary-fixed-dim": "md.ref.palette.secondary80",
"md.sys.color.shadow": "md.ref.palette.neutral0",
- "md.sys.color.surface": "md.ref.palette.neutral10",
+ "md.sys.color.surface": "md.ref.palette.neutral6",
"md.sys.color.surface-bright": "md.ref.palette.neutral24",
"md.sys.color.surface-container": "md.ref.palette.neutral12",
"md.sys.color.surface-container-high": "md.ref.palette.neutral17",
diff --git a/dev/tools/gen_defaults/data/color_light.json b/dev/tools/gen_defaults/data/color_light.json
index fd7be56..5ca7bdc 100644
--- a/dev/tools/gen_defaults/data/color_light.json
+++ b/dev/tools/gen_defaults/data/color_light.json
@@ -1,7 +1,7 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.sys.color.background": "md.ref.palette.neutral99",
+ "md.sys.color.background": "md.ref.palette.neutral98",
"md.sys.color.error": "md.ref.palette.error40",
"md.sys.color.error-container": "md.ref.palette.error90",
"md.sys.color.inverse-on-surface": "md.ref.palette.neutral95",
@@ -36,7 +36,7 @@
"md.sys.color.secondary-fixed": "md.ref.palette.secondary90",
"md.sys.color.secondary-fixed-dim": "md.ref.palette.secondary80",
"md.sys.color.shadow": "md.ref.palette.neutral0",
- "md.sys.color.surface": "md.ref.palette.neutral99",
+ "md.sys.color.surface": "md.ref.palette.neutral98",
"md.sys.color.surface-bright": "md.ref.palette.neutral98",
"md.sys.color.surface-container": "md.ref.palette.neutral94",
"md.sys.color.surface-container-high": "md.ref.palette.neutral92",
diff --git a/dev/tools/gen_defaults/data/date_picker_docked.json b/dev/tools/gen_defaults/data/date_picker_docked.json
index 4ab28db..a8812e7 100644
--- a/dev/tools/gen_defaults/data/date_picker_docked.json
+++ b/dev/tools/gen_defaults/data/date_picker_docked.json
@@ -1,11 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.date-picker.docked.container.color": "surface",
+ "md.comp.date-picker.docked.container.color": "surfaceContainerHigh",
"md.comp.date-picker.docked.container.elevation": "md.sys.elevation.level3",
"md.comp.date-picker.docked.container.height": 456.0,
"md.comp.date-picker.docked.container.shape": "md.sys.shape.corner.large",
- "md.comp.date-picker.docked.container.surface-tint-layer.color": "surfaceTint",
"md.comp.date-picker.docked.container.width": 360.0,
"md.comp.date-picker.docked.date.container.height": 48.0,
"md.comp.date-picker.docked.date.container.shape": "md.sys.shape.corner.full",
diff --git a/dev/tools/gen_defaults/data/date_picker_input_modal.json b/dev/tools/gen_defaults/data/date_picker_input_modal.json
index b6f0fae..96c9bf2 100644
--- a/dev/tools/gen_defaults/data/date_picker_input_modal.json
+++ b/dev/tools/gen_defaults/data/date_picker_input_modal.json
@@ -1,11 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.date-input.modal.container.color": "surface",
+ "md.comp.date-input.modal.container.color": "surfaceContainerHigh",
"md.comp.date-input.modal.container.elevation": "md.sys.elevation.level3",
"md.comp.date-input.modal.container.height": 512.0,
"md.comp.date-input.modal.container.shape": "md.sys.shape.corner.extra-large",
- "md.comp.date-input.modal.container.surface-tint-layer.color": "surfaceTint",
"md.comp.date-input.modal.container.width": 328.0,
"md.comp.date-input.modal.header.container.height": 120.0,
"md.comp.date-input.modal.header.container.width": 328.0,
diff --git a/dev/tools/gen_defaults/data/date_picker_modal.json b/dev/tools/gen_defaults/data/date_picker_modal.json
index 84a3ffa..259bd8f 100644
--- a/dev/tools/gen_defaults/data/date_picker_modal.json
+++ b/dev/tools/gen_defaults/data/date_picker_modal.json
@@ -1,11 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.date-picker.modal.container.color": "surface",
+ "md.comp.date-picker.modal.container.color": "surfaceContainerHigh",
"md.comp.date-picker.modal.container.elevation": "md.sys.elevation.level3",
"md.comp.date-picker.modal.container.height": 568.0,
"md.comp.date-picker.modal.container.shape": "md.sys.shape.corner.extra-large",
- "md.comp.date-picker.modal.container.surface-tint-layer.color": "surfaceTint",
"md.comp.date-picker.modal.container.width": 360.0,
"md.comp.date-picker.modal.date.container.height": 40.0,
"md.comp.date-picker.modal.date.container.shape": "md.sys.shape.corner.full",
diff --git a/dev/tools/gen_defaults/data/dialog.json b/dev/tools/gen_defaults/data/dialog.json
index 6fe28cb..579f2b5 100644
--- a/dev/tools/gen_defaults/data/dialog.json
+++ b/dev/tools/gen_defaults/data/dialog.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.dialog.action.focus.label-text.color": "primary",
"md.comp.dialog.action.focus.state-layer.color": "primary",
@@ -12,10 +12,9 @@
"md.comp.dialog.action.pressed.label-text.color": "primary",
"md.comp.dialog.action.pressed.state-layer.color": "primary",
"md.comp.dialog.action.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
- "md.comp.dialog.container.color": "surface",
+ "md.comp.dialog.container.color": "surfaceContainerHigh",
"md.comp.dialog.container.elevation": "md.sys.elevation.level3",
"md.comp.dialog.container.shape": "md.sys.shape.corner.extra-large",
- "md.comp.dialog.container.surface-tint-layer.color": "surfaceTint",
"md.comp.dialog.headline.color": "onSurface",
"md.comp.dialog.headline.text-style": "headlineSmall",
"md.comp.dialog.supporting-text.color": "onSurfaceVariant",
diff --git a/dev/tools/gen_defaults/data/dialog_fullscreen.json b/dev/tools/gen_defaults/data/dialog_fullscreen.json
index 9eb61d4..66d898d 100644
--- a/dev/tools/gen_defaults/data/dialog_fullscreen.json
+++ b/dev/tools/gen_defaults/data/dialog_fullscreen.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.full-screen-dialog.container.color": "surface",
"md.comp.full-screen-dialog.container.elevation": "md.sys.elevation.level0",
@@ -18,10 +18,10 @@
"md.comp.full-screen-dialog.header.container.color": "surface",
"md.comp.full-screen-dialog.header.container.elevation": "md.sys.elevation.level0",
"md.comp.full-screen-dialog.header.container.height": 56.0,
- "md.comp.full-screen-dialog.header.container.surface-tint-layer.color": "surfaceTint",
"md.comp.full-screen-dialog.header.headline.color": "onSurface",
"md.comp.full-screen-dialog.header.headline.text-style": "titleLarge",
"md.comp.full-screen-dialog.header.icon.color": "onSurface",
"md.comp.full-screen-dialog.header.icon.size": 24.0,
+ "md.comp.full-screen-dialog.header.on-scroll.container.color": "surfaceContainer",
"md.comp.full-screen-dialog.header.on-scroll.container.elevation": "md.sys.elevation.level2"
}
diff --git a/dev/tools/gen_defaults/data/divider.json b/dev/tools/gen_defaults/data/divider.json
index 2f8c946..58fc139 100644
--- a/dev/tools/gen_defaults/data/divider.json
+++ b/dev/tools/gen_defaults/data/divider.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.divider.color": "outlineVariant",
"md.comp.divider.thickness": 1.0
diff --git a/dev/tools/gen_defaults/data/elevation.json b/dev/tools/gen_defaults/data/elevation.json
index f1f2939..365b6a1 100644
--- a/dev/tools/gen_defaults/data/elevation.json
+++ b/dev/tools/gen_defaults/data/elevation.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.sys.elevation.level0": 0.0,
"md.sys.elevation.level1": 1.0,
diff --git a/dev/tools/gen_defaults/data/fab_extended_primary.json b/dev/tools/gen_defaults/data/fab_extended_primary.json
index 39855aa..3214de7 100644
--- a/dev/tools/gen_defaults/data/fab_extended_primary.json
+++ b/dev/tools/gen_defaults/data/fab_extended_primary.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.extended-fab.primary.container.color": "primaryContainer",
"md.comp.extended-fab.primary.container.elevation": "md.sys.elevation.level3",
@@ -8,6 +8,9 @@
"md.comp.extended-fab.primary.container.shape": "md.sys.shape.corner.large",
"md.comp.extended-fab.primary.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.extended-fab.primary.focus.icon.color": "onPrimaryContainer",
+ "md.comp.extended-fab.primary.focus.indicator.color": "secondary",
+ "md.comp.extended-fab.primary.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.extended-fab.primary.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.extended-fab.primary.focus.label-text.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.focus.state-layer.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/fab_large_primary.json b/dev/tools/gen_defaults/data/fab_large_primary.json
index e0c7125..aadbb96 100644
--- a/dev/tools/gen_defaults/data/fab_large_primary.json
+++ b/dev/tools/gen_defaults/data/fab_large_primary.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.fab.primary.large.container.color": "primaryContainer",
"md.comp.fab.primary.large.container.elevation": "md.sys.elevation.level3",
@@ -9,6 +9,9 @@
"md.comp.fab.primary.large.container.width": 96.0,
"md.comp.fab.primary.large.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.large.focus.icon.color": "onPrimaryContainer",
+ "md.comp.fab.primary.large.focus.indicator.color": "secondary",
+ "md.comp.fab.primary.large.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.fab.primary.large.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.fab.primary.large.focus.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.large.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.fab.primary.large.hover.container.elevation": "md.sys.elevation.level4",
diff --git a/dev/tools/gen_defaults/data/fab_primary.json b/dev/tools/gen_defaults/data/fab_primary.json
index f5e3d5a..82da7e3 100644
--- a/dev/tools/gen_defaults/data/fab_primary.json
+++ b/dev/tools/gen_defaults/data/fab_primary.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.fab.primary.container.color": "primaryContainer",
"md.comp.fab.primary.container.elevation": "md.sys.elevation.level3",
@@ -9,6 +9,9 @@
"md.comp.fab.primary.container.width": 56.0,
"md.comp.fab.primary.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.focus.icon.color": "onPrimaryContainer",
+ "md.comp.fab.primary.focus.indicator.color": "secondary",
+ "md.comp.fab.primary.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.fab.primary.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.fab.primary.focus.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.fab.primary.hover.container.elevation": "md.sys.elevation.level4",
diff --git a/dev/tools/gen_defaults/data/fab_small_primary.json b/dev/tools/gen_defaults/data/fab_small_primary.json
index bde0cd6..03aa08f 100644
--- a/dev/tools/gen_defaults/data/fab_small_primary.json
+++ b/dev/tools/gen_defaults/data/fab_small_primary.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.fab.primary.small.container.color": "primaryContainer",
"md.comp.fab.primary.small.container.elevation": "md.sys.elevation.level3",
@@ -9,6 +9,9 @@
"md.comp.fab.primary.small.container.width": 40.0,
"md.comp.fab.primary.small.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.small.focus.icon.color": "onPrimaryContainer",
+ "md.comp.fab.primary.small.focus.indicator.color": "secondary",
+ "md.comp.fab.primary.small.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.fab.primary.small.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.fab.primary.small.focus.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.small.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.fab.primary.small.hover.container.elevation": "md.sys.elevation.level4",
diff --git a/dev/tools/gen_defaults/data/icon_button.json b/dev/tools/gen_defaults/data/icon_button.json
index be76788..187f534 100644
--- a/dev/tools/gen_defaults/data/icon_button.json
+++ b/dev/tools/gen_defaults/data/icon_button.json
@@ -1,8 +1,11 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.icon-button.disabled.icon.color": "onSurface",
"md.comp.icon-button.disabled.icon.opacity": 0.38,
+ "md.comp.icon-button.focus.indicator.color": "secondary",
+ "md.comp.icon-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.icon-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.icon-button.icon.size": 24.0,
"md.comp.icon-button.selected.focus.icon.color": "primary",
"md.comp.icon-button.selected.focus.state-layer.color": "primary",
@@ -14,8 +17,9 @@
"md.comp.icon-button.selected.pressed.icon.color": "primary",
"md.comp.icon-button.selected.pressed.state-layer.color": "primary",
"md.comp.icon-button.selected.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
+ "md.comp.icon-button.state-layer.height": 40.0,
"md.comp.icon-button.state-layer.shape": "md.sys.shape.corner.full",
- "md.comp.icon-button.state-layer.size": 40.0,
+ "md.comp.icon-button.state-layer.width": 40.0,
"md.comp.icon-button.unselected.focus.icon.color": "onSurfaceVariant",
"md.comp.icon-button.unselected.focus.state-layer.color": "onSurfaceVariant",
"md.comp.icon-button.unselected.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/icon_button_filled.json b/dev/tools/gen_defaults/data/icon_button_filled.json
index eebf003..8d827d7 100644
--- a/dev/tools/gen_defaults/data/icon_button_filled.json
+++ b/dev/tools/gen_defaults/data/icon_button_filled.json
@@ -1,14 +1,18 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.filled-icon-button.container.color": "primary",
+ "md.comp.filled-icon-button.container.height": 40.0,
"md.comp.filled-icon-button.container.shape": "md.sys.shape.corner.full",
- "md.comp.filled-icon-button.container.size": 40.0,
+ "md.comp.filled-icon-button.container.width": 40.0,
"md.comp.filled-icon-button.disabled.container.color": "onSurface",
"md.comp.filled-icon-button.disabled.container.opacity": 0.12,
"md.comp.filled-icon-button.disabled.icon.color": "onSurface",
"md.comp.filled-icon-button.disabled.icon.opacity": 0.38,
"md.comp.filled-icon-button.focus.icon.color": "onPrimary",
+ "md.comp.filled-icon-button.focus.indicator.color": "secondary",
+ "md.comp.filled-icon-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.filled-icon-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.filled-icon-button.focus.state-layer.color": "onPrimary",
"md.comp.filled-icon-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.filled-icon-button.hover.icon.color": "onPrimary",
@@ -34,5 +38,5 @@
"md.comp.filled-icon-button.toggle.unselected.icon.color": "primary",
"md.comp.filled-icon-button.toggle.unselected.pressed.icon.color": "primary",
"md.comp.filled-icon-button.toggle.unselected.pressed.state-layer.color": "primary",
- "md.comp.filled-icon-button.unselected.container.color": "surfaceVariant"
+ "md.comp.filled-icon-button.unselected.container.color": "surfaceContainerHighest"
}
diff --git a/dev/tools/gen_defaults/data/icon_button_filled_tonal.json b/dev/tools/gen_defaults/data/icon_button_filled_tonal.json
index 8d61d26..9b02d06 100644
--- a/dev/tools/gen_defaults/data/icon_button_filled_tonal.json
+++ b/dev/tools/gen_defaults/data/icon_button_filled_tonal.json
@@ -1,14 +1,18 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.filled-tonal-icon-button.container.color": "secondaryContainer",
+ "md.comp.filled-tonal-icon-button.container.height": 40.0,
"md.comp.filled-tonal-icon-button.container.shape": "md.sys.shape.corner.full",
- "md.comp.filled-tonal-icon-button.container.size": 40.0,
+ "md.comp.filled-tonal-icon-button.container.width": 40.0,
"md.comp.filled-tonal-icon-button.disabled.container.color": "onSurface",
"md.comp.filled-tonal-icon-button.disabled.container.opacity": 0.12,
"md.comp.filled-tonal-icon-button.disabled.icon.color": "onSurface",
"md.comp.filled-tonal-icon-button.disabled.icon.opacity": 0.38,
"md.comp.filled-tonal-icon-button.focus.icon.color": "onSecondaryContainer",
+ "md.comp.filled-tonal-icon-button.focus.indicator.color": "secondary",
+ "md.comp.filled-tonal-icon-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.filled-tonal-icon-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.filled-tonal-icon-button.focus.state-layer.color": "onSecondaryContainer",
"md.comp.filled-tonal-icon-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.filled-tonal-icon-button.hover.icon.color": "onSecondaryContainer",
@@ -34,5 +38,5 @@
"md.comp.filled-tonal-icon-button.toggle.unselected.icon.color": "onSurfaceVariant",
"md.comp.filled-tonal-icon-button.toggle.unselected.pressed.icon.color": "onSurfaceVariant",
"md.comp.filled-tonal-icon-button.toggle.unselected.pressed.state-layer.color": "onSurfaceVariant",
- "md.comp.filled-tonal-icon-button.unselected.container.color": "surfaceVariant"
+ "md.comp.filled-tonal-icon-button.unselected.container.color": "surfaceContainerHighest"
}
diff --git a/dev/tools/gen_defaults/data/icon_button_outlined.json b/dev/tools/gen_defaults/data/icon_button_outlined.json
index 7c01066..2edf60d 100644
--- a/dev/tools/gen_defaults/data/icon_button_outlined.json
+++ b/dev/tools/gen_defaults/data/icon_button_outlined.json
@@ -1,14 +1,18 @@
{
- "version": "v0_162",
+ "version": "v0_206",
+ "md.comp.outlined-icon-button.container.height": 40.0,
"md.comp.outlined-icon-button.container.shape": "md.sys.shape.corner.full",
- "md.comp.outlined-icon-button.container.size": 40.0,
+ "md.comp.outlined-icon-button.container.width": 40.0,
"md.comp.outlined-icon-button.disabled.icon.color": "onSurface",
"md.comp.outlined-icon-button.disabled.icon.opacity": 0.38,
"md.comp.outlined-icon-button.disabled.selected.container.color": "onSurface",
"md.comp.outlined-icon-button.disabled.selected.container.opacity": 0.12,
"md.comp.outlined-icon-button.disabled.unselected.outline.color": "onSurface",
"md.comp.outlined-icon-button.disabled.unselected.outline.opacity": 0.12,
+ "md.comp.outlined-icon-button.focus.indicator.color": "secondary",
+ "md.comp.outlined-icon-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.outlined-icon-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.outlined-icon-button.focus.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.outlined-icon-button.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.outlined-icon-button.icon.size": 24.0,
diff --git a/dev/tools/gen_defaults/data/list.json b/dev/tools/gen_defaults/data/list.json
index a557a2d..442b203 100644
--- a/dev/tools/gen_defaults/data/list.json
+++ b/dev/tools/gen_defaults/data/list.json
@@ -1,6 +1,11 @@
{
- "version": "v0_162",
+ "version": "v0_206",
+ "md.comp.list.divider.leading-space": 16.0,
+ "md.comp.list.divider.trailing-space": 16.0,
+ "md.comp.list.focus.indicator.color": "secondary",
+ "md.comp.list.focus.indicator.outline.offset": "md.sys.state.focus-indicator.inner-offset",
+ "md.comp.list.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.list.list-item.container.color": "surface",
"md.comp.list.list-item.container.elevation": "md.sys.elevation.level0",
"md.comp.list.list-item.container.shape": "md.sys.shape.corner.none",
@@ -37,10 +42,11 @@
"md.comp.list.list-item.leading-avatar.shape": "md.sys.shape.corner.full",
"md.comp.list.list-item.leading-avatar.size": 40.0,
"md.comp.list.list-item.leading-icon.color": "onSurfaceVariant",
- "md.comp.list.list-item.leading-icon.size": 18.0,
+ "md.comp.list.list-item.leading-icon.size": 24.0,
"md.comp.list.list-item.leading-image.height": 56.0,
"md.comp.list.list-item.leading-image.shape": "md.sys.shape.corner.none",
"md.comp.list.list-item.leading-image.width": 56.0,
+ "md.comp.list.list-item.leading-space": 16.0,
"md.comp.list.list-item.leading-video.shape": "md.sys.shape.corner.none",
"md.comp.list.list-item.leading-video.width": 100.0,
"md.comp.list.list-item.one-line.container.height": 56.0,
@@ -58,6 +64,7 @@
"md.comp.list.list-item.three-line.container.height": 88.0,
"md.comp.list.list-item.trailing-icon.color": "onSurfaceVariant",
"md.comp.list.list-item.trailing-icon.size": 24.0,
+ "md.comp.list.list-item.trailing-space": 16.0,
"md.comp.list.list-item.trailing-supporting-text.color": "onSurfaceVariant",
"md.comp.list.list-item.trailing-supporting-text.text-style": "labelSmall",
"md.comp.list.list-item.two-line.container.height": 72.0,
diff --git a/dev/tools/gen_defaults/data/menu.json b/dev/tools/gen_defaults/data/menu.json
index 9791545..76cb65c 100644
--- a/dev/tools/gen_defaults/data/menu.json
+++ b/dev/tools/gen_defaults/data/menu.json
@@ -1,10 +1,15 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.menu.container.color": "surface",
+ "md.comp.menu.container.color": "surfaceContainer",
"md.comp.menu.container.elevation": "md.sys.elevation.level2",
"md.comp.menu.container.shadow-color": "shadow",
"md.comp.menu.container.shape": "md.sys.shape.corner.extra-small",
- "md.comp.menu.container.surface-tint-layer.color": "surfaceTint",
- "md.comp.menu.list-item.selected.container.color": "surfaceVariant"
+ "md.comp.menu.focus.indicator.color": "secondary",
+ "md.comp.menu.focus.indicator.outline.offset": "md.sys.state.focus-indicator.inner-offset",
+ "md.comp.menu.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
+ "md.comp.menu.list-item.selected.container.color": "secondaryContainer",
+ "md.comp.menu.list-item.selected.label-text.color": "onSecondaryContainer",
+ "md.comp.menu.list-item.selected.with-leading-icon.trailing-icon.color": "onSecondaryContainer",
+ "md.comp.menu.menu-list-item-with-leading-icon-icon-color": "onSecondaryContainer"
}
diff --git a/dev/tools/gen_defaults/data/motion.json b/dev/tools/gen_defaults/data/motion.json
index 90c1fab..4b708de 100644
--- a/dev/tools/gen_defaults/data/motion.json
+++ b/dev/tools/gen_defaults/data/motion.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.sys.motion.duration.extra-long1Ms": 700.0,
"md.sys.motion.duration.extra-long2Ms": 800.0,
diff --git a/dev/tools/gen_defaults/data/navigation_bar.json b/dev/tools/gen_defaults/data/navigation_bar.json
index c972fba..7803d9f 100644
--- a/dev/tools/gen_defaults/data/navigation_bar.json
+++ b/dev/tools/gen_defaults/data/navigation_bar.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.navigation-bar.active.focus.icon.color": "onSecondaryContainer",
"md.comp.navigation-bar.active.focus.label-text.color": "onSurface",
@@ -16,11 +16,13 @@
"md.comp.navigation-bar.active.pressed.icon.color": "onSecondaryContainer",
"md.comp.navigation-bar.active.pressed.label-text.color": "onSurface",
"md.comp.navigation-bar.active.pressed.state-layer.color": "onSurface",
- "md.comp.navigation-bar.container.color": "surface",
+ "md.comp.navigation-bar.container.color": "surfaceContainer",
"md.comp.navigation-bar.container.elevation": "md.sys.elevation.level2",
"md.comp.navigation-bar.container.height": 80.0,
"md.comp.navigation-bar.container.shape": "md.sys.shape.corner.none",
- "md.comp.navigation-bar.container.surface-tint-layer.color": "surfaceTint",
+ "md.comp.navigation-bar.focus.indicator.color": "secondary",
+ "md.comp.navigation-bar.focus.indicator.outline.offset": "md.sys.state.focus-indicator.inner-offset",
+ "md.comp.navigation-bar.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.navigation-bar.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.navigation-bar.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.navigation-bar.icon.size": 24.0,
diff --git a/dev/tools/gen_defaults/data/navigation_drawer.json b/dev/tools/gen_defaults/data/navigation_drawer.json
index c33b58d..6eda37d 100644
--- a/dev/tools/gen_defaults/data/navigation_drawer.json
+++ b/dev/tools/gen_defaults/data/navigation_drawer.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.navigation-drawer.active.focus.icon.color": "onSecondaryContainer",
"md.comp.navigation-drawer.active.focus.label-text.color": "onSecondaryContainer",
@@ -17,11 +17,12 @@
"md.comp.navigation-drawer.active.pressed.label-text.color": "onSecondaryContainer",
"md.comp.navigation-drawer.active.pressed.state-layer.color": "onSecondaryContainer",
"md.comp.navigation-drawer.bottom.container.shape": "md.sys.shape.corner.large.top",
- "md.comp.navigation-drawer.container.color": "surface",
"md.comp.navigation-drawer.container.height": 100.0,
"md.comp.navigation-drawer.container.shape": "md.sys.shape.corner.large.end",
- "md.comp.navigation-drawer.container.surface-tint-layer.color": "surfaceTint",
"md.comp.navigation-drawer.container.width": 360.0,
+ "md.comp.navigation-drawer.focus.indicator.color": "secondary",
+ "md.comp.navigation-drawer.focus.indicator.outline.offset": "md.sys.state.focus-indicator.inner-offset",
+ "md.comp.navigation-drawer.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.navigation-drawer.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.navigation-drawer.headline.color": "onSurfaceVariant",
"md.comp.navigation-drawer.headline.text-style": "titleSmall",
@@ -41,7 +42,9 @@
"md.comp.navigation-drawer.label-text.text-style": "labelLarge",
"md.comp.navigation-drawer.large-badge-label.color": "onSurfaceVariant",
"md.comp.navigation-drawer.large-badge-label.text-style": "labelLarge",
+ "md.comp.navigation-drawer.modal.container.color": "surfaceContainerLow",
"md.comp.navigation-drawer.modal.container.elevation": "md.sys.elevation.level1",
"md.comp.navigation-drawer.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
+ "md.comp.navigation-drawer.standard.container.color": "surface",
"md.comp.navigation-drawer.standard.container.elevation": "md.sys.elevation.level0"
}
diff --git a/dev/tools/gen_defaults/data/navigation_rail.json b/dev/tools/gen_defaults/data/navigation_rail.json
index 23c164b..f58bd1a 100644
--- a/dev/tools/gen_defaults/data/navigation_rail.json
+++ b/dev/tools/gen_defaults/data/navigation_rail.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.navigation-rail.active.focus.icon.color": "onSecondaryContainer",
"md.comp.navigation-rail.active.focus.label-text.color": "onSurface",
@@ -35,17 +35,6 @@
"md.comp.navigation-rail.inactive.pressed.label-text.color": "onSurface",
"md.comp.navigation-rail.inactive.pressed.state-layer.color": "onSurface",
"md.comp.navigation-rail.label-text.text-style": "labelMedium",
- "md.comp.navigation-rail.menu.focus.icon.color": "onSurface",
- "md.comp.navigation-rail.menu.focus.state-layer.color": "onSurface",
- "md.comp.navigation-rail.menu.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
- "md.comp.navigation-rail.menu.hover.icon.color": "onSurface",
- "md.comp.navigation-rail.menu.hover.state-layer.color": "onSurface",
- "md.comp.navigation-rail.menu.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
- "md.comp.navigation-rail.menu.icon.color": "onSurfaceVariant",
- "md.comp.navigation-rail.menu.icon.size": 24.0,
- "md.comp.navigation-rail.menu.pressed.icon.color": "onSurface",
- "md.comp.navigation-rail.menu.pressed.state-layer.color": "onSurface",
- "md.comp.navigation-rail.menu.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.navigation-rail.no-label.active-indicator.height": 56.0,
"md.comp.navigation-rail.no-label.active-indicator.shape": "md.sys.shape.corner.full",
"md.comp.navigation-rail.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity"
diff --git a/dev/tools/gen_defaults/data/navigation_tab_primary.json b/dev/tools/gen_defaults/data/navigation_tab_primary.json
index 3dc16c3..d3873d1 100644
--- a/dev/tools/gen_defaults/data/navigation_tab_primary.json
+++ b/dev/tools/gen_defaults/data/navigation_tab_primary.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.primary-navigation-tab.active.focus.state-layer.color": "primary",
"md.comp.primary-navigation-tab.active.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
@@ -13,8 +13,9 @@
"md.comp.primary-navigation-tab.container.elevation": "md.sys.elevation.level0",
"md.comp.primary-navigation-tab.container.height": 48.0,
"md.comp.primary-navigation-tab.container.shape": "md.sys.shape.corner.none",
- "md.comp.primary-navigation-tab.divider.color": "surfaceVariant",
- "md.comp.primary-navigation-tab.divider.height": 1.0,
+ "md.comp.primary-navigation-tab.focus.indicator.color": "secondary",
+ "md.comp.primary-navigation-tab.focus.indicator.outline.offset": "md.sys.state.focus-indicator.inner-offset",
+ "md.comp.primary-navigation-tab.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.primary-navigation-tab.inactive.focus.state-layer.color": "onSurface",
"md.comp.primary-navigation-tab.inactive.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.primary-navigation-tab.inactive.hover.state-layer.color": "onSurface",
diff --git a/dev/tools/gen_defaults/data/navigation_tab_secondary.json b/dev/tools/gen_defaults/data/navigation_tab_secondary.json
index ab773d1..3b172c5 100644
--- a/dev/tools/gen_defaults/data/navigation_tab_secondary.json
+++ b/dev/tools/gen_defaults/data/navigation_tab_secondary.json
@@ -1,14 +1,17 @@
{
- "version": "v0_162",
+ "version": "v0_206",
+ "md.comp.secondary-navigation-tab.active-indicator.color": "primary",
+ "md.comp.secondary-navigation-tab.active-indicator.height": 2.0,
"md.comp.secondary-navigation-tab.active.label-text.color": "onSurface",
"md.comp.secondary-navigation-tab.container.color": "surface",
"md.comp.secondary-navigation-tab.container.elevation": "md.sys.elevation.level0",
"md.comp.secondary-navigation-tab.container.height": 48.0,
"md.comp.secondary-navigation-tab.container.shadow-color": "shadow",
"md.comp.secondary-navigation-tab.container.shape": "md.sys.shape.corner.none",
- "md.comp.secondary-navigation-tab.divider.color": "surfaceVariant",
- "md.comp.secondary-navigation-tab.divider.height": 1.0,
+ "md.comp.secondary-navigation-tab.focus.indicator.color": "secondary",
+ "md.comp.secondary-navigation-tab.focus.indicator.outline.offset": "md.sys.state.focus-indicator.inner-offset",
+ "md.comp.secondary-navigation-tab.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.secondary-navigation-tab.focus.label-text.color": "onSurface",
"md.comp.secondary-navigation-tab.focus.state-layer.color": "onSurface",
"md.comp.secondary-navigation-tab.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
diff --git a/dev/tools/gen_defaults/data/palette.json b/dev/tools/gen_defaults/data/palette.json
index fbdddbf..89fe3ef 100644
--- a/dev/tools/gen_defaults/data/palette.json
+++ b/dev/tools/gen_defaults/data/palette.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.ref.palette.black": "0xFF000000",
"md.ref.palette.error0": "0xFF000000",
@@ -16,29 +16,29 @@
"md.ref.palette.error95": "0xFFFCEEEE",
"md.ref.palette.error99": "0xFFFFFBF9",
"md.ref.palette.neutral0": "0xFF000000",
- "md.ref.palette.neutral10": "0xFF1C1B1F",
+ "md.ref.palette.neutral10": "0xFF1D1B20",
"md.ref.palette.neutral100": "0xFFFFFFFF",
- "md.ref.palette.neutral12": "0xFF201F23",
- "md.ref.palette.neutral17": "0xFF2B292D",
- "md.ref.palette.neutral20": "0xFF313033",
- "md.ref.palette.neutral22": "0xFF313033",
- "md.ref.palette.neutral24": "0xFF313033",
- "md.ref.palette.neutral30": "0xFF484649",
- "md.ref.palette.neutral4": "0xFF0E0E11",
- "md.ref.palette.neutral40": "0xFF605D62",
- "md.ref.palette.neutral50": "0xFF787579",
- "md.ref.palette.neutral6": "0xFF141317",
- "md.ref.palette.neutral60": "0xFF939094",
- "md.ref.palette.neutral70": "0xFFAEAAAE",
- "md.ref.palette.neutral80": "0xFFC9C5CA",
- "md.ref.palette.neutral87": "0xFFDDD8DD",
- "md.ref.palette.neutral90": "0xFFE6E1E5",
- "md.ref.palette.neutral92": "0xFFECE7EC",
- "md.ref.palette.neutral94": "0xFFF1ECF1",
- "md.ref.palette.neutral95": "0xFFF4EFF4",
- "md.ref.palette.neutral96": "0xFFF7F2F7",
- "md.ref.palette.neutral98": "0xFFFDF8FD",
- "md.ref.palette.neutral99": "0xFFFFFBFE",
+ "md.ref.palette.neutral12": "0xFF211F26",
+ "md.ref.palette.neutral17": "0xFF2B2930",
+ "md.ref.palette.neutral20": "0xFF322F35",
+ "md.ref.palette.neutral22": "0xFF36343B",
+ "md.ref.palette.neutral24": "0xFF3B383E",
+ "md.ref.palette.neutral30": "0xFF48464C",
+ "md.ref.palette.neutral4": "0xFF0F0D13",
+ "md.ref.palette.neutral40": "0xFF605D64",
+ "md.ref.palette.neutral50": "0xFF79767D",
+ "md.ref.palette.neutral6": "0xFF141218",
+ "md.ref.palette.neutral60": "0xFF938F96",
+ "md.ref.palette.neutral70": "0xFFAEA9B1",
+ "md.ref.palette.neutral80": "0xFFCAC5CD",
+ "md.ref.palette.neutral87": "0xFFDED8E1",
+ "md.ref.palette.neutral90": "0xFFE6E0E9",
+ "md.ref.palette.neutral92": "0xFFECE6F0",
+ "md.ref.palette.neutral94": "0xFFF3EDF7",
+ "md.ref.palette.neutral95": "0xFFF5EFF7",
+ "md.ref.palette.neutral96": "0xFFF7F2FA",
+ "md.ref.palette.neutral98": "0xFFFEF7FF",
+ "md.ref.palette.neutral99": "0xFFFFFBFF",
"md.ref.palette.neutral-variant0": "0xFF000000",
"md.ref.palette.neutral-variant10": "0xFF1D1A22",
"md.ref.palette.neutral-variant100": "0xFFFFFFFF",
diff --git a/dev/tools/gen_defaults/data/progress_indicator_circular.json b/dev/tools/gen_defaults/data/progress_indicator_circular.json
index 0a78f60..8af3fbf 100644
--- a/dev/tools/gen_defaults/data/progress_indicator_circular.json
+++ b/dev/tools/gen_defaults/data/progress_indicator_circular.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.circular-progress-indicator.active-indicator.color": "primary",
"md.comp.circular-progress-indicator.active-indicator.shape": "md.sys.shape.corner.none",
diff --git a/dev/tools/gen_defaults/data/progress_indicator_linear.json b/dev/tools/gen_defaults/data/progress_indicator_linear.json
index 47aaa9b..1f80069 100644
--- a/dev/tools/gen_defaults/data/progress_indicator_linear.json
+++ b/dev/tools/gen_defaults/data/progress_indicator_linear.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.linear-progress-indicator.active-indicator.color": "primary",
"md.comp.linear-progress-indicator.active-indicator.height": 4.0,
@@ -8,7 +8,7 @@
"md.comp.linear-progress-indicator.four-color.active-indicator.one.color": "primary",
"md.comp.linear-progress-indicator.four-color.active-indicator.three.color": "tertiary",
"md.comp.linear-progress-indicator.four-color.active-indicator.two.color": "primaryContainer",
- "md.comp.linear-progress-indicator.track.color": "surfaceVariant",
+ "md.comp.linear-progress-indicator.track.color": "surfaceContainerHighest",
"md.comp.linear-progress-indicator.track.height": 4.0,
"md.comp.linear-progress-indicator.track.shape": "md.sys.shape.corner.none"
}
diff --git a/dev/tools/gen_defaults/data/radio_button.json b/dev/tools/gen_defaults/data/radio_button.json
index b42e696..df8cafa 100644
--- a/dev/tools/gen_defaults/data/radio_button.json
+++ b/dev/tools/gen_defaults/data/radio_button.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.radio-button.disabled.selected.icon.color": "onSurface",
"md.comp.radio-button.disabled.selected.icon.opacity": 0.38,
diff --git a/dev/tools/gen_defaults/data/search_bar.json b/dev/tools/gen_defaults/data/search_bar.json
index 8c3ba0c..f329a9c 100644
--- a/dev/tools/gen_defaults/data/search_bar.json
+++ b/dev/tools/gen_defaults/data/search_bar.json
@@ -1,13 +1,15 @@
{
- "version": "v0_158",
+ "version": "v0_206",
"md.comp.search-bar.avatar.shape": "md.sys.shape.corner.full",
"md.comp.search-bar.avatar.size": 30.0,
- "md.comp.search-bar.container.color": "surface",
+ "md.comp.search-bar.container.color": "surfaceContainerHigh",
"md.comp.search-bar.container.elevation": "md.sys.elevation.level3",
"md.comp.search-bar.container.height": 56.0,
"md.comp.search-bar.container.shape": "md.sys.shape.corner.full",
- "md.comp.search-bar.container.surface-tint-layer.color": "surfaceTint",
+ "md.comp.search-bar.focus.indicator.color": "secondary",
+ "md.comp.search-bar.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.search-bar.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.search-bar.hover.state-layer.color": "onSurface",
"md.comp.search-bar.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.search-bar.hover.supporting-text.color": "onSurfaceVariant",
diff --git a/dev/tools/gen_defaults/data/search_view.json b/dev/tools/gen_defaults/data/search_view.json
index 506f5a2..a53dd32 100644
--- a/dev/tools/gen_defaults/data/search_view.json
+++ b/dev/tools/gen_defaults/data/search_view.json
@@ -1,9 +1,8 @@
{
- "version": "v0_158",
+ "version": "v0_206",
- "md.comp.search-view.container.color": "surface",
+ "md.comp.search-view.container.color": "surfaceContainerHigh",
"md.comp.search-view.container.elevation": "md.sys.elevation.level3",
- "md.comp.search-view.container.surface-tint-layer.color": "surfaceTint",
"md.comp.search-view.divider.color": "outline",
"md.comp.search-view.docked.container.shape": "md.sys.shape.corner.extra-large",
"md.comp.search-view.docked.header.container.height": 56.0,
diff --git a/dev/tools/gen_defaults/data/segmented_button_outlined.json b/dev/tools/gen_defaults/data/segmented_button_outlined.json
index b5aed05..8d3488b 100644
--- a/dev/tools/gen_defaults/data/segmented_button_outlined.json
+++ b/dev/tools/gen_defaults/data/segmented_button_outlined.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.outlined-segmented-button.container.height": 40.0,
"md.comp.outlined-segmented-button.disabled.icon.color": "onSurface",
@@ -8,6 +8,9 @@
"md.comp.outlined-segmented-button.disabled.label-text.opacity": 0.38,
"md.comp.outlined-segmented-button.disabled.outline.color": "onSurface",
"md.comp.outlined-segmented-button.disabled.outline.opacity": 0.12,
+ "md.comp.outlined-segmented-button.focus.indicator.color": "secondary",
+ "md.comp.outlined-segmented-button.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.outlined-segmented-button.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.outlined-segmented-button.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.outlined-segmented-button.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.outlined-segmented-button.label-text.text-style": "labelLarge",
diff --git a/dev/tools/gen_defaults/data/shape.json b/dev/tools/gen_defaults/data/shape.json
index 988cd5b..0176c0b 100644
--- a/dev/tools/gen_defaults/data/shape.json
+++ b/dev/tools/gen_defaults/data/shape.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.sys.shape.corner.extra-large": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
diff --git a/dev/tools/gen_defaults/data/sheet_bottom.json b/dev/tools/gen_defaults/data/sheet_bottom.json
index 53e4c22..e137916 100644
--- a/dev/tools/gen_defaults/data/sheet_bottom.json
+++ b/dev/tools/gen_defaults/data/sheet_bottom.json
@@ -1,14 +1,15 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.sheet.bottom.docked.container.color": "surface",
+ "md.comp.sheet.bottom.docked.container.color": "surfaceContainerLow",
"md.comp.sheet.bottom.docked.container.shape": "md.sys.shape.corner.extra-large.top",
- "md.comp.sheet.bottom.docked.container.surface-tint-layer.color": "surfaceTint",
"md.comp.sheet.bottom.docked.drag-handle.color": "onSurfaceVariant",
"md.comp.sheet.bottom.docked.drag-handle.height": 4.0,
- "md.comp.sheet.bottom.docked.drag-handle.opacity": 0.4,
"md.comp.sheet.bottom.docked.drag-handle.width": 32.0,
"md.comp.sheet.bottom.docked.minimized.container.shape": "md.sys.shape.corner.none",
"md.comp.sheet.bottom.docked.modal.container.elevation": "md.sys.elevation.level1",
- "md.comp.sheet.bottom.docked.standard.container.elevation": "md.sys.elevation.level1"
+ "md.comp.sheet.bottom.docked.standard.container.elevation": "md.sys.elevation.level1",
+ "md.comp.sheet.bottom.focus.indicator.color": "secondary",
+ "md.comp.sheet.bottom.focus.indicator.outline.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.sheet.bottom.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness"
}
diff --git a/dev/tools/gen_defaults/data/slider.json b/dev/tools/gen_defaults/data/slider.json
index f7d7579..9dfda74 100644
--- a/dev/tools/gen_defaults/data/slider.json
+++ b/dev/tools/gen_defaults/data/slider.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.slider.active.track.color": "primary",
"md.comp.slider.active.track.height": 4.0,
@@ -23,7 +23,7 @@
"md.comp.slider.hover.handle.color": "primary",
"md.comp.slider.hover.state-layer.color": "primary",
"md.comp.slider.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
- "md.comp.slider.inactive.track.color": "surfaceVariant",
+ "md.comp.slider.inactive.track.color": "surfaceContainerHighest",
"md.comp.slider.inactive.track.height": 4.0,
"md.comp.slider.inactive.track.shape": "md.sys.shape.corner.full",
"md.comp.slider.label.container.color": "primary",
diff --git a/dev/tools/gen_defaults/data/snackbar.json b/dev/tools/gen_defaults/data/snackbar.json
index 79e0598..e2cfbd2 100644
--- a/dev/tools/gen_defaults/data/snackbar.json
+++ b/dev/tools/gen_defaults/data/snackbar.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.snackbar.action.focus.label-text.color": "inversePrimary",
"md.comp.snackbar.action.focus.state-layer.color": "inversePrimary",
diff --git a/dev/tools/gen_defaults/data/state.json b/dev/tools/gen_defaults/data/state.json
index e7bb1ce..6556e10 100644
--- a/dev/tools/gen_defaults/data/state.json
+++ b/dev/tools/gen_defaults/data/state.json
@@ -1,8 +1,8 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.sys.state.dragged.state-layer-opacity": 0.16,
- "md.sys.state.focus.state-layer-opacity": 0.12,
+ "md.sys.state.focus.state-layer-opacity": 0.1,
"md.sys.state.hover.state-layer-opacity": 0.08,
- "md.sys.state.pressed.state-layer-opacity": 0.12
+ "md.sys.state.pressed.state-layer-opacity": 0.1
}
diff --git a/dev/tools/gen_defaults/data/switch.json b/dev/tools/gen_defaults/data/switch.json
index c8c5b51..dd45bed 100644
--- a/dev/tools/gen_defaults/data/switch.json
+++ b/dev/tools/gen_defaults/data/switch.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.switch.disabled.selected.handle.color": "surface",
"md.comp.switch.disabled.selected.handle.opacity": 1.0,
@@ -9,10 +9,13 @@
"md.comp.switch.disabled.track.opacity": 0.12,
"md.comp.switch.disabled.unselected.handle.color": "onSurface",
"md.comp.switch.disabled.unselected.handle.opacity": 0.38,
- "md.comp.switch.disabled.unselected.icon.color": "surfaceVariant",
+ "md.comp.switch.disabled.unselected.icon.color": "surfaceContainerHighest",
"md.comp.switch.disabled.unselected.icon.opacity": 0.38,
- "md.comp.switch.disabled.unselected.track.color": "surfaceVariant",
+ "md.comp.switch.disabled.unselected.track.color": "surfaceContainerHighest",
"md.comp.switch.disabled.unselected.track.outline.color": "onSurface",
+ "md.comp.switch.focus.indicator.color": "secondary",
+ "md.comp.switch.focus.indicator.offset": "md.sys.state.focus-indicator.outer-offset",
+ "md.comp.switch.focus.indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.switch.handle.shape": "md.sys.shape.corner.full",
"md.comp.switch.pressed.handle.height": 28.0,
"md.comp.switch.pressed.handle.width": 28.0,
@@ -44,29 +47,29 @@
"md.comp.switch.track.shape": "md.sys.shape.corner.full",
"md.comp.switch.track.width": 52.0,
"md.comp.switch.unselected.focus.handle.color": "onSurfaceVariant",
- "md.comp.switch.unselected.focus.icon.color": "surfaceVariant",
+ "md.comp.switch.unselected.focus.icon.color": "surfaceContainerHighest",
"md.comp.switch.unselected.focus.state-layer.color": "onSurface",
"md.comp.switch.unselected.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
- "md.comp.switch.unselected.focus.track.color": "surfaceVariant",
+ "md.comp.switch.unselected.focus.track.color": "surfaceContainerHighest",
"md.comp.switch.unselected.focus.track.outline.color": "outline",
"md.comp.switch.unselected.handle.color": "outline",
"md.comp.switch.unselected.handle.height": 16.0,
"md.comp.switch.unselected.handle.width": 16.0,
"md.comp.switch.unselected.hover.handle.color": "onSurfaceVariant",
- "md.comp.switch.unselected.hover.icon.color": "surfaceVariant",
+ "md.comp.switch.unselected.hover.icon.color": "surfaceContainerHighest",
"md.comp.switch.unselected.hover.state-layer.color": "onSurface",
"md.comp.switch.unselected.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
- "md.comp.switch.unselected.hover.track.color": "surfaceVariant",
+ "md.comp.switch.unselected.hover.track.color": "surfaceContainerHighest",
"md.comp.switch.unselected.hover.track.outline.color": "outline",
- "md.comp.switch.unselected.icon.color": "surfaceVariant",
+ "md.comp.switch.unselected.icon.color": "surfaceContainerHighest",
"md.comp.switch.unselected.icon.size": 16.0,
"md.comp.switch.unselected.pressed.handle.color": "onSurfaceVariant",
- "md.comp.switch.unselected.pressed.icon.color": "surfaceVariant",
+ "md.comp.switch.unselected.pressed.icon.color": "surfaceContainerHighest",
"md.comp.switch.unselected.pressed.state-layer.color": "onSurface",
"md.comp.switch.unselected.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
- "md.comp.switch.unselected.pressed.track.color": "surfaceVariant",
+ "md.comp.switch.unselected.pressed.track.color": "surfaceContainerHighest",
"md.comp.switch.unselected.pressed.track.outline.color": "outline",
- "md.comp.switch.unselected.track.color": "surfaceVariant",
+ "md.comp.switch.unselected.track.color": "surfaceContainerHighest",
"md.comp.switch.unselected.track.outline.color": "outline",
"md.comp.switch.with-icon.handle.height": 24.0,
"md.comp.switch.with-icon.handle.width": 24.0
diff --git a/dev/tools/gen_defaults/data/text_field_filled.json b/dev/tools/gen_defaults/data/text_field_filled.json
index f0f2f2f..d1eb675 100644
--- a/dev/tools/gen_defaults/data/text_field_filled.json
+++ b/dev/tools/gen_defaults/data/text_field_filled.json
@@ -1,10 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.filled-text-field.active-indicator.color": "onSurfaceVariant",
"md.comp.filled-text-field.active-indicator.height": 1.0,
"md.comp.filled-text-field.caret.color": "primary",
- "md.comp.filled-text-field.container.color": "surfaceVariant",
+ "md.comp.filled-text-field.container.color": "surfaceContainerHighest",
"md.comp.filled-text-field.container.shape": "md.sys.shape.corner.extra-small.top",
"md.comp.filled-text-field.disabled.active-indicator.color": "onSurface",
"md.comp.filled-text-field.disabled.active-indicator.height": 1.0,
@@ -44,6 +44,7 @@
"md.comp.filled-text-field.error.trailing-icon.color": "error",
"md.comp.filled-text-field.focus.active-indicator.color": "primary",
"md.comp.filled-text-field.focus.active-indicator.height": 2.0,
+ "md.comp.filled-text-field.focus.active-indicator.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.filled-text-field.focus.input-text.color": "onSurface",
"md.comp.filled-text-field.focus.label-text.color": "primary",
"md.comp.filled-text-field.focus.leading-icon.color": "onSurfaceVariant",
diff --git a/dev/tools/gen_defaults/data/text_field_outlined.json b/dev/tools/gen_defaults/data/text_field_outlined.json
index 26f442d..44d5ae6 100644
--- a/dev/tools/gen_defaults/data/text_field_outlined.json
+++ b/dev/tools/gen_defaults/data/text_field_outlined.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.outlined-text-field.caret.color": "primary",
"md.comp.outlined-text-field.container.shape": "md.sys.shape.corner.extra-small",
@@ -17,6 +17,7 @@
"md.comp.outlined-text-field.disabled.trailing-icon.color": "onSurface",
"md.comp.outlined-text-field.disabled.trailing-icon.opacity": 0.38,
"md.comp.outlined-text-field.error.focus.caret.color": "error",
+ "md.comp.outlined-text-field.error.focus.indicator.outline.color": "error",
"md.comp.outlined-text-field.error.focus.input-text.color": "onSurface",
"md.comp.outlined-text-field.error.focus.label-text.color": "error",
"md.comp.outlined-text-field.error.focus.leading-icon.color": "onSurfaceVariant",
@@ -35,6 +36,8 @@
"md.comp.outlined-text-field.error.outline.color": "error",
"md.comp.outlined-text-field.error.supporting-text.color": "error",
"md.comp.outlined-text-field.error.trailing-icon.color": "error",
+ "md.comp.outlined-text-field.focus.indicator.outline.color": "secondary",
+ "md.comp.outlined-text-field.focus.indicator.outline.thickness": "md.sys.state.focus-indicator.thickness",
"md.comp.outlined-text-field.focus.input-text.color": "onSurface",
"md.comp.outlined-text-field.focus.label-text.color": "primary",
"md.comp.outlined-text-field.focus.leading-icon.color": "onSurfaceVariant",
diff --git a/dev/tools/gen_defaults/data/text_style.json b/dev/tools/gen_defaults/data/text_style.json
index 019da1e..0eeb1fc 100644
--- a/dev/tools/gen_defaults/data/text_style.json
+++ b/dev/tools/gen_defaults/data/text_style.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.sys.typescale.body-large.font": "md.ref.typeface.plain",
"md.sys.typescale.body-large.line-height": 24.0,
diff --git a/dev/tools/gen_defaults/data/time_picker.json b/dev/tools/gen_defaults/data/time_picker.json
index 3ac8ae3..e2e1468 100644
--- a/dev/tools/gen_defaults/data/time_picker.json
+++ b/dev/tools/gen_defaults/data/time_picker.json
@@ -1,7 +1,7 @@
{
- "version": "v0_162",
+ "version": "v0_206",
- "md.comp.time-picker.clock-dial.color": "surfaceVariant",
+ "md.comp.time-picker.clock-dial.color": "surfaceContainerHighest",
"md.comp.time-picker.clock-dial.container.size": 256.0,
"md.comp.time-picker.clock-dial.label-text.text-style": "bodyLarge",
"md.comp.time-picker.clock-dial.selected.label-text.color": "onPrimary",
@@ -15,7 +15,7 @@
"md.comp.time-picker.clock-dial.selector.track.container.width": 2.0,
"md.comp.time-picker.clock-dial.shape": "md.sys.shape.corner.full",
"md.comp.time-picker.clock-dial.unselected.label-text.color": "onSurface",
- "md.comp.time-picker.container.color": "surface",
+ "md.comp.time-picker.container.color": "surfaceContainerHigh",
"md.comp.time-picker.container.elevation": "md.sys.elevation.level3",
"md.comp.time-picker.container.shape": "md.sys.shape.corner.extra-large",
"md.comp.time-picker.headline.color": "onSurfaceVariant",
@@ -46,7 +46,6 @@
"md.comp.time-picker.period-selector.unselected.pressed.state-layer.color": "onSurfaceVariant",
"md.comp.time-picker.period-selector.vertical.container.height": 80.0,
"md.comp.time-picker.period-selector.vertical.container.width": 52.0,
- "md.comp.time-picker.surface-tint-layer.color": "surfaceTint",
"md.comp.time-picker.time-selector.24h-vertical.container.width": 114.0,
"md.comp.time-picker.time-selector.container.height": 80.0,
"md.comp.time-picker.time-selector.container.shape": "md.sys.shape.corner.small",
@@ -65,7 +64,7 @@
"md.comp.time-picker.time-selector.selected.pressed.state-layer.color": "onPrimaryContainer",
"md.comp.time-picker.time-selector.separator.color": "onSurface",
"md.comp.time-picker.time-selector.separator.text-style": "displayLarge",
- "md.comp.time-picker.time-selector.unselected.container.color": "surfaceVariant",
+ "md.comp.time-picker.time-selector.unselected.container.color": "surfaceContainerHighest",
"md.comp.time-picker.time-selector.unselected.focus.label-text.color": "onSurface",
"md.comp.time-picker.time-selector.unselected.focus.state-layer.color": "onSurface",
"md.comp.time-picker.time-selector.unselected.hover.label-text.color": "onSurface",
diff --git a/dev/tools/gen_defaults/data/top_app_bar_large.json b/dev/tools/gen_defaults/data/top_app_bar_large.json
index bc2d979..9da1d8c 100644
--- a/dev/tools/gen_defaults/data/top_app_bar_large.json
+++ b/dev/tools/gen_defaults/data/top_app_bar_large.json
@@ -1,11 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.top-app-bar.large.container.color": "surface",
"md.comp.top-app-bar.large.container.elevation": "md.sys.elevation.level0",
"md.comp.top-app-bar.large.container.height": 152.0,
"md.comp.top-app-bar.large.container.shape": "md.sys.shape.corner.none",
- "md.comp.top-app-bar.large.container.surface-tint-layer.color": "surfaceTint",
"md.comp.top-app-bar.large.headline.color": "onSurface",
"md.comp.top-app-bar.large.headline.text-style": "headlineMedium",
"md.comp.top-app-bar.large.leading-icon.color": "onSurface",
diff --git a/dev/tools/gen_defaults/data/top_app_bar_medium.json b/dev/tools/gen_defaults/data/top_app_bar_medium.json
index 39ff113..9a5e6d9 100644
--- a/dev/tools/gen_defaults/data/top_app_bar_medium.json
+++ b/dev/tools/gen_defaults/data/top_app_bar_medium.json
@@ -1,11 +1,10 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.top-app-bar.medium.container.color": "surface",
"md.comp.top-app-bar.medium.container.elevation": "md.sys.elevation.level0",
"md.comp.top-app-bar.medium.container.height": 112.0,
"md.comp.top-app-bar.medium.container.shape": "md.sys.shape.corner.none",
- "md.comp.top-app-bar.medium.container.surface-tint-layer.color": "surfaceTint",
"md.comp.top-app-bar.medium.headline.color": "onSurface",
"md.comp.top-app-bar.medium.headline.text-style": "headlineSmall",
"md.comp.top-app-bar.medium.leading-icon.color": "onSurface",
diff --git a/dev/tools/gen_defaults/data/top_app_bar_small.json b/dev/tools/gen_defaults/data/top_app_bar_small.json
index 90053e0..24f5aff 100644
--- a/dev/tools/gen_defaults/data/top_app_bar_small.json
+++ b/dev/tools/gen_defaults/data/top_app_bar_small.json
@@ -1,15 +1,15 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.comp.top-app-bar.small.container.color": "surface",
"md.comp.top-app-bar.small.container.elevation": "md.sys.elevation.level0",
"md.comp.top-app-bar.small.container.height": 64.0,
"md.comp.top-app-bar.small.container.shape": "md.sys.shape.corner.none",
- "md.comp.top-app-bar.small.container.surface-tint-layer.color": "surfaceTint",
"md.comp.top-app-bar.small.headline.color": "onSurface",
"md.comp.top-app-bar.small.headline.text-style": "titleLarge",
"md.comp.top-app-bar.small.leading-icon.color": "onSurface",
"md.comp.top-app-bar.small.leading-icon.size": 24.0,
+ "md.comp.top-app-bar.small.on-scroll.container.color": "surfaceContainer",
"md.comp.top-app-bar.small.on-scroll.container.elevation": "md.sys.elevation.level2",
"md.comp.top-app-bar.small.trailing-icon.color": "onSurfaceVariant",
"md.comp.top-app-bar.small.trailing-icon.size": 24.0
diff --git a/dev/tools/gen_defaults/data/typeface.json b/dev/tools/gen_defaults/data/typeface.json
index f32100b..02dbc65 100644
--- a/dev/tools/gen_defaults/data/typeface.json
+++ b/dev/tools/gen_defaults/data/typeface.json
@@ -1,5 +1,5 @@
{
- "version": "v0_162",
+ "version": "v0_206",
"md.ref.typeface.brand": "Roboto",
"md.ref.typeface.plain": "Roboto",
diff --git a/dev/tools/gen_defaults/generated/used_tokens.csv b/dev/tools/gen_defaults/generated/used_tokens.csv
index e40d249..12446e1 100644
--- a/dev/tools/gen_defaults/generated/used_tokens.csv
+++ b/dev/tools/gen_defaults/generated/used_tokens.csv
@@ -1,7 +1,5 @@
-Versions used, v0_162, v0_202, v0_158
+Versions used, v0_206
md.comp.assist-chip.container.shape,
-md.comp.assist-chip.container.surface-tint-layer.color,
-md.comp.assist-chip.disabled.label-text.color,
md.comp.assist-chip.elevated.container.elevation,
md.comp.assist-chip.elevated.container.shadow-color,
md.comp.assist-chip.elevated.disabled.container.color,
@@ -25,13 +23,11 @@
md.comp.badge.size,
md.comp.banner.container.color,
md.comp.banner.container.elevation,
-md.comp.banner.container.surface-tint-layer.color,
md.comp.banner.supporting-text.text-style,
md.comp.bottom-app-bar.container.color,
md.comp.bottom-app-bar.container.elevation,
md.comp.bottom-app-bar.container.height,
md.comp.bottom-app-bar.container.shape,
-md.comp.bottom-app-bar.container.surface-tint-layer.color,
md.comp.checkbox.error.focus.state-layer.color,
md.comp.checkbox.error.focus.state-layer.opacity,
md.comp.checkbox.error.hover.state-layer.color,
@@ -75,7 +71,6 @@
md.comp.date-picker.modal.container.color,
md.comp.date-picker.modal.container.elevation,
md.comp.date-picker.modal.container.shape,
-md.comp.date-picker.modal.container.surface-tint-layer.color,
md.comp.date-picker.modal.date.focus.state-layer.opacity,
md.comp.date-picker.modal.date.hover.state-layer.opacity,
md.comp.date-picker.modal.date.label-text.text-style,
@@ -124,7 +119,6 @@
md.comp.dialog.container.color,
md.comp.dialog.container.elevation,
md.comp.dialog.container.shape,
-md.comp.dialog.container.surface-tint-layer.color,
md.comp.dialog.headline.text-style,
md.comp.dialog.supporting-text.text-style,
md.comp.divider.color,
@@ -134,7 +128,6 @@
md.comp.elevated-button.container.height,
md.comp.elevated-button.container.shadow-color,
md.comp.elevated-button.container.shape,
-md.comp.elevated-button.container.surface-tint-layer.color,
md.comp.elevated-button.disabled.container.color,
md.comp.elevated-button.disabled.container.elevation,
md.comp.elevated-button.disabled.container.opacity,
@@ -155,7 +148,6 @@
md.comp.elevated-card.container.elevation,
md.comp.elevated-card.container.shadow-color,
md.comp.elevated-card.container.shape,
-md.comp.elevated-card.container.surface-tint-layer.color,
md.comp.extended-fab.primary.container.height,
md.comp.extended-fab.primary.container.shape,
md.comp.extended-fab.primary.icon.size,
@@ -210,8 +202,9 @@
md.comp.filled-card.container.shadow-color,
md.comp.filled-card.container.shape,
md.comp.filled-icon-button.container.color,
+md.comp.filled-icon-button.container.height,
md.comp.filled-icon-button.container.shape,
-md.comp.filled-icon-button.container.size,
+md.comp.filled-icon-button.container.width,
md.comp.filled-icon-button.disabled.container.color,
md.comp.filled-icon-button.disabled.container.opacity,
md.comp.filled-icon-button.disabled.icon.color,
@@ -300,8 +293,9 @@
md.comp.filled-tonal-button.pressed.state-layer.color,
md.comp.filled-tonal-button.pressed.state-layer.opacity,
md.comp.filled-tonal-icon-button.container.color,
+md.comp.filled-tonal-icon-button.container.height,
md.comp.filled-tonal-icon-button.container.shape,
-md.comp.filled-tonal-icon-button.container.size,
+md.comp.filled-tonal-icon-button.container.width,
md.comp.filled-tonal-icon-button.disabled.container.color,
md.comp.filled-tonal-icon-button.disabled.container.opacity,
md.comp.filled-tonal-icon-button.disabled.icon.color,
@@ -325,8 +319,6 @@
md.comp.filled-tonal-icon-button.toggle.unselected.pressed.state-layer.color,
md.comp.filled-tonal-icon-button.unselected.container.color,
md.comp.filter-chip.container.shape,
-md.comp.filter-chip.container.surface-tint-layer.color,
-md.comp.filter-chip.disabled.label-text.color,
md.comp.filter-chip.elevated.container.elevation,
md.comp.filter-chip.elevated.container.shadow-color,
md.comp.filter-chip.elevated.disabled.container.color,
@@ -364,7 +356,6 @@
md.comp.icon-button.selected.pressed.state-layer.color,
md.comp.icon-button.selected.pressed.state-layer.opacity,
md.comp.icon-button.state-layer.shape,
-md.comp.icon-button.state-layer.size,
md.comp.icon-button.unselected.focus.state-layer.color,
md.comp.icon-button.unselected.focus.state-layer.opacity,
md.comp.icon-button.unselected.hover.state-layer.color,
@@ -425,7 +416,6 @@
md.comp.menu.container.elevation,
md.comp.menu.container.shadow-color,
md.comp.menu.container.shape,
-md.comp.menu.container.surface-tint-layer.color,
md.comp.navigation-bar.active-indicator.color,
md.comp.navigation-bar.active-indicator.shape,
md.comp.navigation-bar.active.icon.color,
@@ -433,7 +423,6 @@
md.comp.navigation-bar.container.color,
md.comp.navigation-bar.container.elevation,
md.comp.navigation-bar.container.height,
-md.comp.navigation-bar.container.surface-tint-layer.color,
md.comp.navigation-bar.icon.size,
md.comp.navigation-bar.inactive.icon.color,
md.comp.navigation-bar.inactive.label-text.color,
@@ -444,12 +433,11 @@
md.comp.navigation-drawer.active-indicator.width,
md.comp.navigation-drawer.active.icon.color,
md.comp.navigation-drawer.active.label-text.color,
-md.comp.navigation-drawer.container.color,
-md.comp.navigation-drawer.container.surface-tint-layer.color,
md.comp.navigation-drawer.icon.size,
md.comp.navigation-drawer.inactive.icon.color,
md.comp.navigation-drawer.inactive.label-text.color,
md.comp.navigation-drawer.label-text.text-style,
+md.comp.navigation-drawer.modal.container.color,
md.comp.navigation-drawer.modal.container.elevation,
md.comp.navigation-rail.active-indicator.color,
md.comp.navigation-rail.active-indicator.shape,
@@ -483,11 +471,11 @@
md.comp.outlined-card.container.elevation,
md.comp.outlined-card.container.shadow-color,
md.comp.outlined-card.container.shape,
-md.comp.outlined-card.container.surface-tint-layer.color,
md.comp.outlined-card.outline.color,
md.comp.outlined-card.outline.width,
+md.comp.outlined-icon-button.container.height,
md.comp.outlined-icon-button.container.shape,
-md.comp.outlined-icon-button.container.size,
+md.comp.outlined-icon-button.container.width,
md.comp.outlined-icon-button.disabled.icon.color,
md.comp.outlined-icon-button.disabled.icon.opacity,
md.comp.outlined-icon-button.disabled.selected.container.color,
@@ -556,8 +544,6 @@
md.comp.primary-navigation-tab.active.hover.state-layer.opacity,
md.comp.primary-navigation-tab.active.pressed.state-layer.color,
md.comp.primary-navigation-tab.active.pressed.state-layer.opacity,
-md.comp.primary-navigation-tab.divider.color,
-md.comp.primary-navigation-tab.divider.height,
md.comp.primary-navigation-tab.inactive.focus.state-layer.color,
md.comp.primary-navigation-tab.inactive.focus.state-layer.opacity,
md.comp.primary-navigation-tab.inactive.hover.state-layer.color,
@@ -595,7 +581,6 @@
md.comp.search-bar.container.elevation,
md.comp.search-bar.container.height,
md.comp.search-bar.container.shape,
-md.comp.search-bar.container.surface-tint-layer.color,
md.comp.search-bar.hover.state-layer.color,
md.comp.search-bar.hover.state-layer.opacity,
md.comp.search-bar.input-text.color,
@@ -606,7 +591,6 @@
md.comp.search-bar.supporting-text.text-style,
md.comp.search-view.container.color,
md.comp.search-view.container.elevation,
-md.comp.search-view.container.surface-tint-layer.color,
md.comp.search-view.divider.color,
md.comp.search-view.docked.container.shape,
md.comp.search-view.full-screen.container.shape,
@@ -616,8 +600,6 @@
md.comp.search-view.header.supporting-text.color,
md.comp.search-view.header.supporting-text.text-style,
md.comp.secondary-navigation-tab.active.label-text.color,
-md.comp.secondary-navigation-tab.divider.color,
-md.comp.secondary-navigation-tab.divider.height,
md.comp.secondary-navigation-tab.focus.state-layer.color,
md.comp.secondary-navigation-tab.focus.state-layer.opacity,
md.comp.secondary-navigation-tab.hover.state-layer.color,
@@ -628,10 +610,8 @@
md.comp.secondary-navigation-tab.pressed.state-layer.opacity,
md.comp.sheet.bottom.docked.container.color,
md.comp.sheet.bottom.docked.container.shape,
-md.comp.sheet.bottom.docked.container.surface-tint-layer.color,
md.comp.sheet.bottom.docked.drag-handle.color,
md.comp.sheet.bottom.docked.drag-handle.height,
-md.comp.sheet.bottom.docked.drag-handle.opacity,
md.comp.sheet.bottom.docked.drag-handle.width,
md.comp.sheet.bottom.docked.modal.container.elevation,
md.comp.sheet.bottom.docked.standard.container.elevation,
@@ -801,7 +781,6 @@
md.comp.top-app-bar.small.container.color,
md.comp.top-app-bar.small.container.elevation,
md.comp.top-app-bar.small.container.height,
-md.comp.top-app-bar.small.container.surface-tint-layer.color,
md.comp.top-app-bar.small.headline.color,
md.comp.top-app-bar.small.headline.text-style,
md.comp.top-app-bar.small.leading-icon.color,
@@ -823,10 +802,21 @@
md.ref.palette.neutral-variant90,
md.ref.palette.neutral0,
md.ref.palette.neutral10,
+md.ref.palette.neutral100,
+md.ref.palette.neutral12,
+md.ref.palette.neutral17,
md.ref.palette.neutral20,
+md.ref.palette.neutral22,
+md.ref.palette.neutral24,
+md.ref.palette.neutral4,
+md.ref.palette.neutral6,
+md.ref.palette.neutral87,
md.ref.palette.neutral90,
+md.ref.palette.neutral92,
+md.ref.palette.neutral94,
md.ref.palette.neutral95,
-md.ref.palette.neutral99,
+md.ref.palette.neutral96,
+md.ref.palette.neutral98,
md.ref.palette.primary10,
md.ref.palette.primary100,
md.ref.palette.primary20,
@@ -861,24 +851,43 @@
md.sys.color.on-error-container,
md.sys.color.on-primary,
md.sys.color.on-primary-container,
+md.sys.color.on-primary-fixed,
+md.sys.color.on-primary-fixed-variant,
md.sys.color.on-secondary,
md.sys.color.on-secondary-container,
+md.sys.color.on-secondary-fixed,
+md.sys.color.on-secondary-fixed-variant,
md.sys.color.on-surface,
md.sys.color.on-surface-variant,
md.sys.color.on-tertiary,
md.sys.color.on-tertiary-container,
+md.sys.color.on-tertiary-fixed,
+md.sys.color.on-tertiary-fixed-variant,
md.sys.color.outline,
md.sys.color.outline-variant,
md.sys.color.primary,
md.sys.color.primary-container,
+md.sys.color.primary-fixed,
+md.sys.color.primary-fixed-dim,
md.sys.color.scrim,
md.sys.color.secondary,
md.sys.color.secondary-container,
+md.sys.color.secondary-fixed,
+md.sys.color.secondary-fixed-dim,
md.sys.color.shadow,
md.sys.color.surface,
+md.sys.color.surface-bright,
+md.sys.color.surface-container,
+md.sys.color.surface-container-high,
+md.sys.color.surface-container-highest,
+md.sys.color.surface-container-low,
+md.sys.color.surface-container-lowest,
+md.sys.color.surface-dim,
md.sys.color.surface-variant,
md.sys.color.tertiary,
md.sys.color.tertiary-container,
+md.sys.color.tertiary-fixed,
+md.sys.color.tertiary-fixed-dim,
md.sys.elevation.level0,
md.sys.elevation.level1,
md.sys.elevation.level2,
diff --git a/dev/tools/gen_defaults/lib/action_chip_template.dart b/dev/tools/gen_defaults/lib/action_chip_template.dart
index c9eca9a..4cd61fc 100644
--- a/dev/tools/gen_defaults/lib/action_chip_template.dart
+++ b/dev/tools/gen_defaults/lib/action_chip_template.dart
@@ -52,7 +52,9 @@
? ${componentColor("$tokenGroup$flatVariant.disabled.container")}
: ${componentColor("$tokenGroup$elevatedVariant.disabled.container")};
}
- return ${componentColor("$tokenGroup$flatVariant.container")};
+ return _chipVariant == _ChipVariant.flat
+ ? ${componentColor("$tokenGroup$flatVariant.container")}
+ : ${componentColor("$tokenGroup$elevatedVariant.container")};
});
@override
diff --git a/dev/tools/gen_defaults/lib/banner_template.dart b/dev/tools/gen_defaults/lib/banner_template.dart
index 7d622b8..a24657a 100644
--- a/dev/tools/gen_defaults/lib/banner_template.dart
+++ b/dev/tools/gen_defaults/lib/banner_template.dart
@@ -24,7 +24,7 @@
Color? get backgroundColor => ${componentColor("md.comp.banner.container")};
@override
- Color? get surfaceTintColor => ${color("md.comp.banner.container.surface-tint-layer.color")};
+ Color? get surfaceTintColor => ${colorOrTransparent("md.comp.banner.container.surface-tint-layer.color")};
@override
Color? get dividerColor => ${color("md.comp.divider.color")};
diff --git a/dev/tools/gen_defaults/lib/bottom_app_bar_template.dart b/dev/tools/gen_defaults/lib/bottom_app_bar_template.dart
index 00e0e98..8b2ee0f 100644
--- a/dev/tools/gen_defaults/lib/bottom_app_bar_template.dart
+++ b/dev/tools/gen_defaults/lib/bottom_app_bar_template.dart
@@ -26,7 +26,7 @@
Color? get color => ${componentColor('md.comp.bottom-app-bar.container')};
@override
- Color? get surfaceTintColor => ${componentColor('md.comp.bottom-app-bar.container.surface-tint-layer')};
+ Color? get surfaceTintColor => ${colorOrTransparent('md.comp.bottom-app-bar.container.surface-tint-layer')};
@override
Color? get shadowColor => Colors.transparent;
diff --git a/dev/tools/gen_defaults/lib/bottom_sheet_template.dart b/dev/tools/gen_defaults/lib/bottom_sheet_template.dart
index e355b63..03da35c 100644
--- a/dev/tools/gen_defaults/lib/bottom_sheet_template.dart
+++ b/dev/tools/gen_defaults/lib/bottom_sheet_template.dart
@@ -30,7 +30,7 @@
Color? get backgroundColor => ${componentColor("md.comp.sheet.bottom.docked.container")};
@override
- Color? get surfaceTintColor => ${componentColor("md.comp.sheet.bottom.docked.container.surface-tint-layer")};
+ Color? get surfaceTintColor => ${colorOrTransparent("md.comp.sheet.bottom.docked.container.surface-tint-layer")};
@override
Color? get shadowColor => Colors.transparent;
diff --git a/dev/tools/gen_defaults/lib/color_scheme_template.dart b/dev/tools/gen_defaults/lib/color_scheme_template.dart
index a09ad6e..eb6c2d7 100644
--- a/dev/tools/gen_defaults/lib/color_scheme_template.dart
+++ b/dev/tools/gen_defaults/lib/color_scheme_template.dart
@@ -32,14 +32,26 @@
onPrimary: Color(${light('md.sys.color.on-primary')}),
primaryContainer: Color(${light('md.sys.color.primary-container')}),
onPrimaryContainer: Color(${light('md.sys.color.on-primary-container')}),
+ primaryFixed: Color(${light('md.sys.color.primary-fixed')}),
+ primaryFixedDim: Color(${light('md.sys.color.primary-fixed-dim')}),
+ onPrimaryFixed: Color(${light('md.sys.color.on-primary-fixed')}),
+ onPrimaryFixedVariant: Color(${light('md.sys.color.on-primary-fixed-variant')}),
secondary: Color(${light('md.sys.color.secondary')}),
onSecondary: Color(${light('md.sys.color.on-secondary')}),
secondaryContainer: Color(${light('md.sys.color.secondary-container')}),
onSecondaryContainer: Color(${light('md.sys.color.on-secondary-container')}),
+ secondaryFixed: Color(${light('md.sys.color.secondary-fixed')}),
+ secondaryFixedDim: Color(${light('md.sys.color.secondary-fixed-dim')}),
+ onSecondaryFixed: Color(${light('md.sys.color.on-secondary-fixed')}),
+ onSecondaryFixedVariant: Color(${light('md.sys.color.on-secondary-fixed-variant')}),
tertiary: Color(${light('md.sys.color.tertiary')}),
onTertiary: Color(${light('md.sys.color.on-tertiary')}),
tertiaryContainer: Color(${light('md.sys.color.tertiary-container')}),
onTertiaryContainer: Color(${light('md.sys.color.on-tertiary-container')}),
+ tertiaryFixed: Color(${light('md.sys.color.tertiary-fixed')}),
+ tertiaryFixedDim: Color(${light('md.sys.color.tertiary-fixed-dim')}),
+ onTertiaryFixed: Color(${light('md.sys.color.on-tertiary-fixed')}),
+ onTertiaryFixedVariant: Color(${light('md.sys.color.on-tertiary-fixed-variant')}),
error: Color(${light('md.sys.color.error')}),
onError: Color(${light('md.sys.color.on-error')}),
errorContainer: Color(${light('md.sys.color.error-container')}),
@@ -47,6 +59,13 @@
background: Color(${light('md.sys.color.background')}),
onBackground: Color(${light('md.sys.color.on-background')}),
surface: Color(${light('md.sys.color.surface')}),
+ surfaceBright: Color(${light('md.sys.color.surface-bright')}),
+ surfaceContainerLowest: Color(${light('md.sys.color.surface-container-lowest')}),
+ surfaceContainerLow: Color(${light('md.sys.color.surface-container-low')}),
+ surfaceContainer: Color(${light('md.sys.color.surface-container')}),
+ surfaceContainerHigh: Color(${light('md.sys.color.surface-container-high')}),
+ surfaceContainerHighest: Color(${light('md.sys.color.surface-container-highest')}),
+ surfaceDim: Color(${light('md.sys.color.surface-dim')}),
onSurface: Color(${light('md.sys.color.on-surface')}),
surfaceVariant: Color(${light('md.sys.color.surface-variant')}),
onSurfaceVariant: Color(${light('md.sys.color.on-surface-variant')}),
@@ -67,14 +86,26 @@
onPrimary: Color(${dark('md.sys.color.on-primary')}),
primaryContainer: Color(${dark('md.sys.color.primary-container')}),
onPrimaryContainer: Color(${dark('md.sys.color.on-primary-container')}),
+ primaryFixed: Color(${dark('md.sys.color.primary-fixed')}),
+ primaryFixedDim: Color(${dark('md.sys.color.primary-fixed-dim')}),
+ onPrimaryFixed: Color(${dark('md.sys.color.on-primary-fixed')}),
+ onPrimaryFixedVariant: Color(${dark('md.sys.color.on-primary-fixed-variant')}),
secondary: Color(${dark('md.sys.color.secondary')}),
onSecondary: Color(${dark('md.sys.color.on-secondary')}),
secondaryContainer: Color(${dark('md.sys.color.secondary-container')}),
onSecondaryContainer: Color(${dark('md.sys.color.on-secondary-container')}),
+ secondaryFixed: Color(${dark('md.sys.color.secondary-fixed')}),
+ secondaryFixedDim: Color(${dark('md.sys.color.secondary-fixed-dim')}),
+ onSecondaryFixed: Color(${dark('md.sys.color.on-secondary-fixed')}),
+ onSecondaryFixedVariant: Color(${dark('md.sys.color.on-secondary-fixed-variant')}),
tertiary: Color(${dark('md.sys.color.tertiary')}),
onTertiary: Color(${dark('md.sys.color.on-tertiary')}),
tertiaryContainer: Color(${dark('md.sys.color.tertiary-container')}),
onTertiaryContainer: Color(${dark('md.sys.color.on-tertiary-container')}),
+ tertiaryFixed: Color(${dark('md.sys.color.tertiary-fixed')}),
+ tertiaryFixedDim: Color(${dark('md.sys.color.tertiary-fixed-dim')}),
+ onTertiaryFixed: Color(${dark('md.sys.color.on-tertiary-fixed')}),
+ onTertiaryFixedVariant: Color(${dark('md.sys.color.on-tertiary-fixed-variant')}),
error: Color(${dark('md.sys.color.error')}),
onError: Color(${dark('md.sys.color.on-error')}),
errorContainer: Color(${dark('md.sys.color.error-container')}),
@@ -82,6 +113,13 @@
background: Color(${dark('md.sys.color.background')}),
onBackground: Color(${dark('md.sys.color.on-background')}),
surface: Color(${dark('md.sys.color.surface')}),
+ surfaceBright: Color(${dark('md.sys.color.surface-bright')}),
+ surfaceContainerLowest: Color(${dark('md.sys.color.surface-container-lowest')}),
+ surfaceContainerLow: Color(${dark('md.sys.color.surface-container-low')}),
+ surfaceContainer: Color(${dark('md.sys.color.surface-container')}),
+ surfaceContainerHigh: Color(${dark('md.sys.color.surface-container-high')}),
+ surfaceContainerHighest: Color(${dark('md.sys.color.surface-container-highest')}),
+ surfaceDim: Color(${dark('md.sys.color.surface-dim')}),
onSurface: Color(${dark('md.sys.color.on-surface')}),
surfaceVariant: Color(${dark('md.sys.color.surface-variant')}),
onSurfaceVariant: Color(${dark('md.sys.color.on-surface-variant')}),
diff --git a/dev/tools/gen_defaults/lib/drawer_template.dart b/dev/tools/gen_defaults/lib/drawer_template.dart
index 6a21403..88de944 100644
--- a/dev/tools/gen_defaults/lib/drawer_template.dart
+++ b/dev/tools/gen_defaults/lib/drawer_template.dart
@@ -17,7 +17,7 @@
late final TextDirection direction = Directionality.of(context);
@override
- Color? get backgroundColor => ${componentColor("md.comp.navigation-drawer.container")};
+ Color? get backgroundColor => ${componentColor("md.comp.navigation-drawer.modal.container")};
@override
Color? get surfaceTintColor => ${colorOrTransparent("md.comp.navigation-drawer.container.surface-tint-layer.color")};
diff --git a/dev/tools/gen_defaults/lib/filter_chip_template.dart b/dev/tools/gen_defaults/lib/filter_chip_template.dart
index 1bf0346..27ef2fb 100644
--- a/dev/tools/gen_defaults/lib/filter_chip_template.dart
+++ b/dev/tools/gen_defaults/lib/filter_chip_template.dart
@@ -71,7 +71,7 @@
}
return _chipVariant == _ChipVariant.flat
? ${componentColor("$tokenGroup$flatVariant.container")}
- : ${componentColor("$tokenGroup$elevatedVariant.container")};
+ : ${componentColor("$tokenGroup$elevatedVariant.unselected.container")};
});
@override
diff --git a/dev/tools/gen_defaults/lib/icon_button_template.dart b/dev/tools/gen_defaults/lib/icon_button_template.dart
index 7031fd3..32d65e3 100644
--- a/dev/tools/gen_defaults/lib/icon_button_template.dart
+++ b/dev/tools/gen_defaults/lib/icon_button_template.dart
@@ -185,14 +185,14 @@
}
String _minimumSize() {
- if (tokenAvailable('$tokenGroup.container.size')) {
+ if (tokenAvailable('$tokenGroup.container.height') && tokenAvailable('$tokenGroup.container.width')) {
return '''
- const MaterialStatePropertyAll<Size>(Size(${getToken('$tokenGroup.container.size')}, ${getToken('$tokenGroup.container.size')}))''';
+ const MaterialStatePropertyAll<Size>(Size(${getToken('$tokenGroup.container.width')}, ${getToken('$tokenGroup.container.height')}))''';
} else {
return '''
- const MaterialStatePropertyAll<Size>(Size(${getToken('$tokenGroup.state-layer.size')}, ${getToken('$tokenGroup.state-layer.size')}))''';
+ const MaterialStatePropertyAll<Size>(Size(40.0, 40.0))''';
}
}
diff --git a/dev/tools/gen_defaults/lib/menu_template.dart b/dev/tools/gen_defaults/lib/menu_template.dart
index cb09087..aaef845 100644
--- a/dev/tools/gen_defaults/lib/menu_template.dart
+++ b/dev/tools/gen_defaults/lib/menu_template.dart
@@ -38,7 +38,7 @@
@override
MaterialStateProperty<Color?>? get surfaceTintColor {
- return MaterialStatePropertyAll<Color?>(${componentColor('md.comp.menu.container.surface-tint-layer')});
+ return const MaterialStatePropertyAll<Color?>(${colorOrTransparent('md.comp.menu.container.surface-tint-layer')});
}
@override
@@ -242,7 +242,10 @@
@override
MaterialStateProperty<Color?>? get surfaceTintColor {
- return MaterialStatePropertyAll<Color?>(${componentColor('md.comp.menu.container.surface-tint-layer')});
+ return ${componentColor('md.comp.menu.container.surface-tint-layer') == 'null'
+ ? 'const MaterialStatePropertyAll<Color?>(Colors.transparent)'
+ : 'MaterialStatePropertyAll<Color?>(${componentColor('md.comp.menu.container.surface-tint-layer')})'
+ };
}
@override
diff --git a/dev/tools/gen_defaults/lib/navigation_drawer_template.dart b/dev/tools/gen_defaults/lib/navigation_drawer_template.dart
index 1328826..0d0ec5c 100644
--- a/dev/tools/gen_defaults/lib/navigation_drawer_template.dart
+++ b/dev/tools/gen_defaults/lib/navigation_drawer_template.dart
@@ -26,7 +26,7 @@
late final TextTheme _textTheme = Theme.of(context).textTheme;
@override
- Color? get backgroundColor => ${componentColor("md.comp.navigation-drawer.container")};
+ Color? get backgroundColor => ${componentColor("md.comp.navigation-drawer.modal.container")};
@override
Color? get surfaceTintColor => ${colorOrTransparent("md.comp.navigation-drawer.container.surface-tint-layer.color")};
diff --git a/dev/tools/gen_defaults/lib/popup_menu_template.dart b/dev/tools/gen_defaults/lib/popup_menu_template.dart
index bed11d0..a29828a 100644
--- a/dev/tools/gen_defaults/lib/popup_menu_template.dart
+++ b/dev/tools/gen_defaults/lib/popup_menu_template.dart
@@ -38,7 +38,7 @@
Color? get shadowColor => ${color("md.comp.menu.container.shadow-color")};
@override
- Color? get surfaceTintColor => ${color("md.comp.menu.container.surface-tint-layer.color")};
+ Color? get surfaceTintColor => ${colorOrTransparent("md.comp.menu.container.surface-tint-layer.color")};
@override
ShapeBorder? get shape => ${shape("md.comp.menu.container")};
diff --git a/dev/tools/gen_defaults/lib/search_bar_template.dart b/dev/tools/gen_defaults/lib/search_bar_template.dart
index 670121b..4b1aceb 100644
--- a/dev/tools/gen_defaults/lib/search_bar_template.dart
+++ b/dev/tools/gen_defaults/lib/search_bar_template.dart
@@ -10,6 +10,15 @@
super.textThemePrefix = '_textTheme.'
});
+ String _surfaceTint() {
+ final String? color = colorOrTransparent('md.comp.search-bar.container.surface-tint-layer.color');
+ final String surfaceTintColor = 'MaterialStatePropertyAll<Color>($color);';
+ if (color == 'Colors.transparent') {
+ return 'const $surfaceTintColor';
+ }
+ return surfaceTintColor;
+ }
+
@override
String generate() => '''
class _SearchBarDefaultsM3 extends SearchBarThemeData {
@@ -33,7 +42,7 @@
@override
MaterialStateProperty<Color>? get surfaceTintColor =>
- MaterialStatePropertyAll<Color>(${colorOrTransparent("md.comp.search-bar.container.surface-tint-layer.color")});
+ ${_surfaceTint()}
@override
MaterialStateProperty<Color?>? get overlayColor =>
diff --git a/dev/tools/gen_defaults/lib/segmented_button_template.dart b/dev/tools/gen_defaults/lib/segmented_button_template.dart
index 8f9e8f6..4d1254e 100644
--- a/dev/tools/gen_defaults/lib/segmented_button_template.dart
+++ b/dev/tools/gen_defaults/lib/segmented_button_template.dart
@@ -124,23 +124,23 @@
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return selectedColor?.withOpacity(0.12);
+ return selectedColor?.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return selectedColor?.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return selectedColor?.withOpacity(0.12);
+ return selectedColor?.withOpacity(0.1);
}
} else {
if (states.contains(MaterialState.pressed)) {
- return unselectedColor?.withOpacity(0.12);
+ return unselectedColor?.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return unselectedColor?.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return unselectedColor?.withOpacity(0.12);
+ return unselectedColor?.withOpacity(0.1);
}
}
return Colors.transparent;
diff --git a/dev/tools/gen_defaults/lib/tabs_template.dart b/dev/tools/gen_defaults/lib/tabs_template.dart
index 25c8957..0dca794 100644
--- a/dev/tools/gen_defaults/lib/tabs_template.dart
+++ b/dev/tools/gen_defaults/lib/tabs_template.dart
@@ -21,11 +21,13 @@
late final TextTheme _textTheme = Theme.of(context).textTheme;
final bool isScrollable;
+ // This value comes from Divider widget defaults. Token db deprecated 'primary-navigation-tab.divider.color' token.
@override
- Color? get dividerColor => ${componentColor("md.comp.primary-navigation-tab.divider")};
+ Color? get dividerColor => ${componentColor("md.comp.divider")};
+ // This value comes from Divider widget defaults. Token db deprecated 'primary-navigation-tab.divider.height' token.
@override
- double? get dividerHeight => ${getToken('md.comp.primary-navigation-tab.divider.height')};
+ double? get dividerHeight => ${getToken("md.comp.divider.thickness")};
@override
Color? get indicatorColor => ${componentColor("md.comp.primary-navigation-tab.active-indicator")};
@@ -93,11 +95,13 @@
late final TextTheme _textTheme = Theme.of(context).textTheme;
final bool isScrollable;
+ // This value comes from Divider widget defaults. Token db deprecated 'secondary-navigation-tab.divider.color' token.
@override
- Color? get dividerColor => ${componentColor("md.comp.secondary-navigation-tab.divider")};
+ Color? get dividerColor => ${componentColor("md.comp.divider")};
+ // This value comes from Divider widget defaults. Token db deprecated 'secondary-navigation-tab.divider.height' token.
@override
- double? get dividerHeight => ${getToken('md.comp.secondary-navigation-tab.divider.height')};
+ double? get dividerHeight => ${getToken("md.comp.divider.thickness")};
@override
Color? get indicatorColor => ${componentColor("md.comp.primary-navigation-tab.active-indicator")};
diff --git a/examples/api/lib/material/color_scheme/color_scheme.0.dart b/examples/api/lib/material/color_scheme/color_scheme.0.dart
new file mode 100644
index 0000000..51ce183
--- /dev/null
+++ b/examples/api/lib/material/color_scheme/color_scheme.0.dart
@@ -0,0 +1,309 @@
+// Copyright 2014 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'package:flutter/material.dart';
+
+/// Flutter code sample for [ColorScheme].
+
+const Widget divider = SizedBox(height: 10);
+
+void main() => runApp(const ColorSchemeExample());
+
+class ColorSchemeExample extends StatefulWidget {
+ const ColorSchemeExample({super.key});
+
+ @override
+ State<ColorSchemeExample> createState() => _ColorSchemeExampleState();
+}
+
+class _ColorSchemeExampleState extends State<ColorSchemeExample> {
+ Color selectedColor = ColorSeed.baseColor.color;
+
+ @override
+ Widget build(BuildContext context) {
+ final Color? colorSeed = selectedColor == ColorSeed.baseColor.color ? null : selectedColor;
+ final ThemeData lightTheme = ThemeData(
+ colorSchemeSeed: colorSeed,
+ brightness: Brightness.light,
+ );
+ final ThemeData darkTheme = ThemeData(
+ colorSchemeSeed: colorSeed,
+ brightness: Brightness.dark,
+ );
+
+ Widget schemeLabel(String brightness) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(vertical: 15),
+ child: Text(
+ brightness,
+ style: const TextStyle(fontWeight: FontWeight.bold),
+ ),
+ );
+ }
+
+ Widget schemeView(ThemeData theme) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 15),
+ child: ColorSchemeView(colorScheme: theme.colorScheme),
+ );
+ }
+
+ return MaterialApp(
+ theme: ThemeData(colorSchemeSeed: selectedColor),
+ home: Builder(
+ builder: (BuildContext context) => Scaffold(
+ appBar: AppBar(
+ title: const Text('ColorScheme'),
+ leading: MenuAnchor(
+ builder: (BuildContext context, MenuController controller, Widget? widget) {
+ return IconButton(
+ icon: Icon(Icons.circle, color: selectedColor),
+ onPressed: () {
+ setState(() {
+ if (!controller.isOpen) {
+ controller.open();
+ }
+ });
+ },
+ );
+ },
+ menuChildren: List<Widget>.generate(ColorSeed.values.length, (int index) {
+ final Color itemColor = ColorSeed.values[index].color;
+ return MenuItemButton(
+ leadingIcon: selectedColor == ColorSeed.values[index].color
+ ? Icon(Icons.circle, color: itemColor)
+ : Icon(Icons.circle_outlined, color: itemColor),
+ onPressed: () {
+ setState(() {
+ selectedColor = itemColor;
+ });
+ },
+ child: Text(ColorSeed.values[index].label),
+ );
+ }),
+ ),
+ ),
+ body: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.only(top: 5),
+ child: Column(
+ children: <Widget>[
+ Row(
+ children: <Widget>[
+ Expanded(
+ child: Column(
+ children: <Widget>[
+ schemeLabel('Light ColorScheme'),
+ schemeView(lightTheme),
+ ],
+ ),
+ ),
+ Expanded(
+ child: Column(
+ children: <Widget>[
+ schemeLabel('Dark ColorScheme'),
+ schemeView(darkTheme),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class ColorSchemeView extends StatelessWidget {
+ const ColorSchemeView({super.key, required this.colorScheme});
+
+ final ColorScheme colorScheme;
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ children: <Widget>[
+ ColorGroup(children: <ColorChip>[
+ ColorChip('primary', colorScheme.primary, colorScheme.onPrimary),
+ ColorChip('onPrimary', colorScheme.onPrimary, colorScheme.primary),
+ ColorChip('primaryContainer', colorScheme.primaryContainer, colorScheme.onPrimaryContainer),
+ ColorChip(
+ 'onPrimaryContainer',
+ colorScheme.onPrimaryContainer,
+ colorScheme.primaryContainer,
+ ),
+ ]),
+ divider,
+ ColorGroup(children: <ColorChip>[
+ ColorChip('primaryFixed', colorScheme.primaryFixed, colorScheme.onPrimaryFixed),
+ ColorChip('onPrimaryFixed', colorScheme.onPrimaryFixed, colorScheme.primaryFixed),
+ ColorChip('primaryFixedDim', colorScheme.primaryFixedDim, colorScheme.onPrimaryFixedVariant),
+ ColorChip(
+ 'onPrimaryFixedVariant',
+ colorScheme.onPrimaryFixedVariant,
+ colorScheme.primaryFixedDim,
+ ),
+ ]),
+ divider,
+ ColorGroup(children: <ColorChip>[
+ ColorChip('secondary', colorScheme.secondary, colorScheme.onSecondary),
+ ColorChip('onSecondary', colorScheme.onSecondary, colorScheme.secondary),
+ ColorChip(
+ 'secondaryContainer',
+ colorScheme.secondaryContainer,
+ colorScheme.onSecondaryContainer,
+ ),
+ ColorChip(
+ 'onSecondaryContainer',
+ colorScheme.onSecondaryContainer,
+ colorScheme.secondaryContainer,
+ ),
+ ]),
+ divider,
+ ColorGroup(children: <ColorChip>[
+ ColorChip('secondaryFixed', colorScheme.secondaryFixed, colorScheme.onSecondaryFixed),
+ ColorChip('onSecondaryFixed', colorScheme.onSecondaryFixed, colorScheme.secondaryFixed),
+ ColorChip(
+ 'secondaryFixedDim',
+ colorScheme.secondaryFixedDim,
+ colorScheme.onSecondaryFixedVariant,
+ ),
+ ColorChip(
+ 'onSecondaryFixedVariant',
+ colorScheme.onSecondaryFixedVariant,
+ colorScheme.secondaryFixedDim,
+ ),
+ ]),
+ divider,
+ ColorGroup(
+ children: <ColorChip>[
+ ColorChip('tertiary', colorScheme.tertiary, colorScheme.onTertiary),
+ ColorChip('onTertiary', colorScheme.onTertiary, colorScheme.tertiary),
+ ColorChip(
+ 'tertiaryContainer',
+ colorScheme.tertiaryContainer,
+ colorScheme.onTertiaryContainer,
+ ),
+ ColorChip(
+ 'onTertiaryContainer',
+ colorScheme.onTertiaryContainer,
+ colorScheme.tertiaryContainer,
+ ),
+ ],
+ ),
+ divider,
+ ColorGroup(children: <ColorChip>[
+ ColorChip('tertiaryFixed', colorScheme.tertiaryFixed, colorScheme.onTertiaryFixed),
+ ColorChip('onTertiaryFixed', colorScheme.onTertiaryFixed, colorScheme.tertiaryFixed),
+ ColorChip('tertiaryFixedDim', colorScheme.tertiaryFixedDim, colorScheme.onTertiaryFixedVariant),
+ ColorChip(
+ 'onTertiaryFixedVariant',
+ colorScheme.onTertiaryFixedVariant,
+ colorScheme.tertiaryFixedDim,
+ ),
+ ]),
+ divider,
+ ColorGroup(
+ children: <ColorChip>[
+ ColorChip('error', colorScheme.error, colorScheme.onError),
+ ColorChip('onError', colorScheme.onError, colorScheme.error),
+ ColorChip('errorContainer', colorScheme.errorContainer, colorScheme.onErrorContainer),
+ ColorChip('onErrorContainer', colorScheme.onErrorContainer, colorScheme.errorContainer),
+ ],
+ ),
+ divider,
+ ColorGroup(
+ children: <ColorChip>[
+ ColorChip('surfaceDim', colorScheme.surfaceDim, colorScheme.onSurface),
+ ColorChip('surface', colorScheme.surface, colorScheme.onSurface),
+ ColorChip('surfaceBright', colorScheme.surfaceBright, colorScheme.onSurface),
+ ColorChip('surfaceContainerLowest', colorScheme.surfaceContainerLowest, colorScheme.onSurface),
+ ColorChip('surfaceContainerLow', colorScheme.surfaceContainerLow, colorScheme.onSurface),
+ ColorChip('surfaceContainer', colorScheme.surfaceContainer, colorScheme.onSurface),
+ ColorChip('surfaceContainerHigh', colorScheme.surfaceContainerHigh, colorScheme.onSurface),
+ ColorChip('surfaceContainerHighest', colorScheme.surfaceContainerHighest, colorScheme.onSurface),
+ ColorChip('onSurface', colorScheme.onSurface, colorScheme.surface),
+ ColorChip(
+ 'onSurfaceVariant',
+ colorScheme.onSurfaceVariant,
+ colorScheme.surfaceContainerHighest,
+ ),
+ ],
+ ),
+ divider,
+ ColorGroup(
+ children: <ColorChip>[
+ ColorChip('outline', colorScheme.outline, null),
+ ColorChip('shadow', colorScheme.shadow, null),
+ ColorChip('inverseSurface', colorScheme.inverseSurface, colorScheme.onInverseSurface),
+ ColorChip('onInverseSurface', colorScheme.onInverseSurface, colorScheme.inverseSurface),
+ ColorChip('inversePrimary', colorScheme.inversePrimary, colorScheme.primary),
+ ],
+ ),
+ ],
+ );
+ }
+}
+
+class ColorGroup extends StatelessWidget {
+ const ColorGroup({super.key, required this.children});
+
+ final List<Widget> children;
+
+ @override
+ Widget build(BuildContext context) {
+ return RepaintBoundary(
+ child: Card(clipBehavior: Clip.antiAlias, child: Column(children: children)),
+ );
+ }
+}
+
+class ColorChip extends StatelessWidget {
+ const ColorChip(this.label, this.color, this.onColor, {super.key});
+
+ final Color color;
+ final Color? onColor;
+ final String label;
+
+ static Color contrastColor(Color color) {
+ final Brightness brightness = ThemeData.estimateBrightnessForColor(color);
+ return brightness == Brightness.dark ? Colors.white : Colors.black;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final Color labelColor = onColor ?? contrastColor(color);
+ return ColoredBox(
+ color: color,
+ child: Padding(
+ padding: const EdgeInsets.all(16),
+ child: Row(
+ children: <Expanded>[
+ Expanded(child: Text(label, style: TextStyle(color: labelColor))),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+enum ColorSeed {
+ baseColor('M3 Baseline', Color(0xff6750a4)),
+ indigo('Indigo', Colors.indigo),
+ blue('Blue', Colors.blue),
+ teal('Teal', Colors.teal),
+ green('Green', Colors.green),
+ yellow('Yellow', Colors.yellow),
+ orange('Orange', Colors.orange),
+ deepOrange('Deep Orange', Colors.deepOrange),
+ pink('Pink', Colors.pink);
+
+ const ColorSeed(this.label, this.color);
+ final String label;
+ final Color color;
+}
diff --git a/examples/api/lib/material/color_scheme/dynamic_content_color.0.dart b/examples/api/lib/material/color_scheme/dynamic_content_color.0.dart
index 0dad925..e3b2b96 100644
--- a/examples/api/lib/material/color_scheme/dynamic_content_color.0.dart
+++ b/examples/api/lib/material/color_scheme/dynamic_content_color.0.dart
@@ -126,7 +126,7 @@
divider,
Expanded(
child: ColoredBox(
- color: colorScheme.background,
+ color: colorScheme.surface,
child: LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
if (constraints.maxWidth < narrowScreenWidthThreshold) {
return SingleChildScrollView(
@@ -226,7 +226,7 @@
child: Card(
color: widget.images.indexOf(image) == selectedImage
? colorScheme.primaryContainer
- : colorScheme.background,
+ : colorScheme.surface,
child: Padding(
padding: const EdgeInsets.all(5.0),
child: ConstrainedBox(
@@ -307,19 +307,10 @@
divider,
ColorGroup(
children: <ColorChip>[
- ColorChip(label: 'background', color: colorScheme.background, onColor: colorScheme.onBackground),
- ColorChip(label: 'onBackground', color: colorScheme.onBackground, onColor: colorScheme.background),
- ],
- ),
- divider,
- ColorGroup(
- children: <ColorChip>[
ColorChip(label: 'surface', color: colorScheme.surface, onColor: colorScheme.onSurface),
ColorChip(label: 'onSurface', color: colorScheme.onSurface, onColor: colorScheme.surface),
ColorChip(
- label: 'surfaceVariant', color: colorScheme.surfaceVariant, onColor: colorScheme.onSurfaceVariant),
- ColorChip(
- label: 'onSurfaceVariant', color: colorScheme.onSurfaceVariant, onColor: colorScheme.surfaceVariant),
+ label: 'onSurfaceVariant', color: colorScheme.onSurfaceVariant, onColor: colorScheme.surfaceContainerHighest),
],
),
divider,
diff --git a/examples/api/lib/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0.dart b/examples/api/lib/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0.dart
index 556c884..f904102 100644
--- a/examples/api/lib/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0.dart
+++ b/examples/api/lib/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0.dart
@@ -133,7 +133,7 @@
width: 32.0,
height: 4.0,
decoration: BoxDecoration(
- color: colorScheme.surfaceVariant,
+ color: colorScheme.surfaceContainerHighest,
borderRadius: BorderRadius.circular(8.0),
),
),
diff --git a/examples/api/lib/widgets/page_view/page_view.0.dart b/examples/api/lib/widgets/page_view/page_view.0.dart
index 4bf3581..336a48a 100644
--- a/examples/api/lib/widgets/page_view/page_view.0.dart
+++ b/examples/api/lib/widgets/page_view/page_view.0.dart
@@ -169,7 +169,7 @@
),
TabPageSelector(
controller: tabController,
- color: colorScheme.background,
+ color: colorScheme.surface,
selectedColor: colorScheme.primary,
),
IconButton(
diff --git a/examples/api/test/material/app/app.0_test.dart b/examples/api/test/material/app/app.0_test.dart
index 007b956..edca957 100644
--- a/examples/api/test/material/app/app.0_test.dart
+++ b/examples/api/test/material/app/app.0_test.dart
@@ -27,7 +27,7 @@
);
// Test the default animation.
- expect(getScaffoldMaterial().color, lightTheme.colorScheme.background);
+ expect(getScaffoldMaterial().color, lightTheme.colorScheme.surface);
await tester.tap(find.text( 'Switch Theme Mode'));
await tester.pump();
@@ -37,13 +37,13 @@
// The Scaffold background color is updated.
expect(
getScaffoldMaterial().color,
- Color.lerp(lightTheme.colorScheme.background, darkTheme.colorScheme.background, 0.5),
+ Color.lerp(lightTheme.colorScheme.surface, darkTheme.colorScheme.surface, 0.5),
);
await tester.pumpAndSettle();
// The Scaffold background color is now fully dark.
- expect(getScaffoldMaterial().color, darkTheme.colorScheme.background);
+ expect(getScaffoldMaterial().color, darkTheme.colorScheme.surface);
// Test the custom animation curve and duration.
await tester.tap(find.text('Custom'));
@@ -55,12 +55,12 @@
await tester.pump(const Duration(milliseconds: 500));
// The Scaffold background color is updated.
- expect(getScaffoldMaterial().color, const Color(0xff3c3e3b));
+ expect(getScaffoldMaterial().color, const Color(0xff333731));
await tester.pumpAndSettle();
// The Scaffold background color is now fully light.
- expect(getScaffoldMaterial().color, lightTheme.colorScheme.background);
+ expect(getScaffoldMaterial().color, lightTheme.colorScheme.surface);
// Test the no animation style.
await tester.tap(find.text('None'));
@@ -71,6 +71,6 @@
await tester.pump();
// The Scaffold background color is updated immediately.
- expect(getScaffoldMaterial().color, darkTheme.colorScheme.background);
+ expect(getScaffoldMaterial().color, darkTheme.colorScheme.surface);
});
}
diff --git a/examples/api/test/material/card/card.2_test.dart b/examples/api/test/material/card/card.2_test.dart
index 1c0d93a..b9753bf 100644
--- a/examples/api/test/material/card/card.2_test.dart
+++ b/examples/api/test/material/card/card.2_test.dart
@@ -31,9 +31,9 @@
expect(defaultCard.shape, const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(12.0)),
));
- expect(defaultCard.color, const Color(0xfffffbfe));
+ expect(defaultCard.color, const Color(0xfff7f2fa));
expect(defaultCard.shadowColor, const Color(0xff000000));
- expect(defaultCard.surfaceTintColor, const Color(0xff6750a4));
+ expect(defaultCard.surfaceTintColor, Colors.transparent);
final Material filledCard = getCardMaterial(tester, 1);
expect(filledCard.clipBehavior, Clip.none);
@@ -41,7 +41,7 @@
expect(filledCard.shape, const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(12.0)),
));
- expect(filledCard.color, const Color(0xffe7e0ec));
+ expect(filledCard.color, const Color(0xffe6e0e9));
expect(filledCard.shadowColor, const Color(0xff000000));
expect(filledCard.surfaceTintColor, const Color(0x00000000));
@@ -52,8 +52,8 @@
side: BorderSide(color: Color(0xffcac4d0)),
borderRadius: BorderRadius.all(Radius.circular(12.0)),
));
- expect(outlinedCard.color, const Color(0xfffffbfe));
+ expect(outlinedCard.color, const Color(0xfffef7ff));
expect(outlinedCard.shadowColor, const Color(0xff000000));
- expect(outlinedCard.surfaceTintColor, const Color(0xff6750a4));
+ expect(outlinedCard.surfaceTintColor, Colors.transparent);
});
}
diff --git a/examples/api/test/material/color_scheme/color_scheme.0_test.dart b/examples/api/test/material/color_scheme/color_scheme.0_test.dart
new file mode 100644
index 0000000..492a718
--- /dev/null
+++ b/examples/api/test/material/color_scheme/color_scheme.0_test.dart
@@ -0,0 +1,41 @@
+// Copyright 2014 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'package:flutter/material.dart';
+import 'package:flutter_api_samples/material/color_scheme/color_scheme.0.dart' as example;
+import 'package:flutter_test/flutter_test.dart';
+
+void main() {
+ testWidgets('ColorScheme Smoke Test', (WidgetTester tester) async {
+ await tester.pumpWidget(
+ const example.ColorSchemeExample(),
+ );
+ expect(find.text('Light ColorScheme'), findsOneWidget);
+ expect(find.text('Dark ColorScheme'), findsOneWidget);
+
+ expect(find.byType(example.ColorChip), findsNWidgets(86));
+ });
+
+ testWidgets('Change color seed', (WidgetTester tester) async {
+ await tester.pumpWidget(
+ const example.ColorSchemeExample(),
+ );
+
+ ColoredBox coloredBox() {
+ return tester.widget<ColoredBox>(
+ find.descendant(
+ of: find.widgetWithText(example.ColorChip, 'primary').first,
+ matching: find.byType(ColoredBox)
+ )
+ );
+ }
+ expect(coloredBox().color, const Color(0xFF6750A4));
+ await tester.tap(find.byType(MenuAnchor));
+ await tester.pumpAndSettle();
+ await tester.tap(find.widgetWithText(MenuItemButton, 'Yellow'));
+ await tester.pumpAndSettle();
+
+ expect(coloredBox().color, const Color(0xFF685F12));
+ });
+}
diff --git a/examples/api/test/material/toggle_buttons/toggle_buttons.0_test.dart b/examples/api/test/material/toggle_buttons/toggle_buttons.0_test.dart
index e2b5063..ccbc919 100644
--- a/examples/api/test/material/toggle_buttons/toggle_buttons.0_test.dart
+++ b/examples/api/test/material/toggle_buttons/toggle_buttons.0_test.dart
@@ -25,7 +25,7 @@
TextButton thirdButton = findButton('Orange');
const Color selectedColor = Color(0xffef9a9a);
- const Color unselectedColor = Color(0x00fffbfe);
+ const Color unselectedColor = Color(0x00fef7ff);
/// First button is selected.
expect(firstButton.style!.backgroundColor!.resolve(enabled), selectedColor);
@@ -63,7 +63,7 @@
TextButton thirdButton = findButton('Carrots');
const Color selectedColor = Color(0xffa5d6a7);
- const Color unselectedColor = Color(0x00fffbfe);
+ const Color unselectedColor = Color(0x00fef7ff);
/// Second button is selected.
expect(firstButton.style!.backgroundColor!.resolve(enabled), unselectedColor);
@@ -102,7 +102,7 @@
TextButton thirdButton = findButton(Icons.ac_unit);
const Color selectedColor = Color(0xff90caf9);
- const Color unselectedColor = Color(0x00fffbfe);
+ const Color unselectedColor = Color(0x00fef7ff);
/// Third button is selected.
diff --git a/packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml b/packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml
index 6e7c3d1..7156deb 100644
--- a/packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml
+++ b/packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml
@@ -26,6 +26,435 @@
version: 1
transforms:
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate background"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: ''
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'background'
+ newName: 'surface'
+ - if: "surface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'background'
+ variables:
+ surface:
+ kind: 'fragment'
+ value: 'arguments[surface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate onBackground"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: ''
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "onSurface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'onBackground'
+ newName: 'onSurface'
+ - if: "onSurface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'onBackground'
+ variables:
+ onSurface:
+ kind: 'fragment'
+ value: 'arguments[onSurface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate surfaceVariant"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: ''
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surfaceContainerHighest == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'surfaceVariant'
+ newName: 'surfaceContainerHighest'
+ - if: "surfaceContainerHighest != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'surfaceVariant'
+ variables:
+ surfaceContainerHighest:
+ kind: 'fragment'
+ value: 'arguments[surfaceContainerHighest]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate background"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'light'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'background'
+ newName: 'surface'
+ - if: "surface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'background'
+ variables:
+ surface:
+ kind: 'fragment'
+ value: 'arguments[surface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate onBackground"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'light'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "onSurface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'onBackground'
+ newName: 'onSurface'
+ - if: "onSurface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'onBackground'
+ variables:
+ onSurface:
+ kind: 'fragment'
+ value: 'arguments[onSurface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate surfaceVariant"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'light'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surfaceContainerHighest == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'surfaceVariant'
+ newName: 'surfaceContainerHighest'
+ - if: "surfaceContainerHighest != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'surfaceVariant'
+ variables:
+ surfaceContainerHighest:
+ kind: 'fragment'
+ value: 'arguments[surfaceContainerHighest]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate background"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'dark'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'background'
+ newName: 'surface'
+ - if: "surface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'background'
+ variables:
+ surface:
+ kind: 'fragment'
+ value: 'arguments[surface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate onBackground"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'dark'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "onSurface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'onBackground'
+ newName: 'onSurface'
+ - if: "onSurface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'onBackground'
+ variables:
+ onSurface:
+ kind: 'fragment'
+ value: 'arguments[onSurface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate surfaceVariant"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'dark'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surfaceContainerHighest == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'surfaceVariant'
+ newName: 'surfaceContainerHighest'
+ - if: "surfaceContainerHighest != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'surfaceVariant'
+ variables:
+ surfaceContainerHighest:
+ kind: 'fragment'
+ value: 'arguments[surfaceContainerHighest]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate background"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'highContrastLight'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'background'
+ newName: 'surface'
+ - if: "surface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'background'
+ variables:
+ surface:
+ kind: 'fragment'
+ value: 'arguments[surface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate onBackground"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'highContrastLight'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "onSurface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'onBackground'
+ newName: 'onSurface'
+ - if: "onSurface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'onBackground'
+ variables:
+ onSurface:
+ kind: 'fragment'
+ value: 'arguments[onSurface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate surfaceVariant"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'highContrastLight'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surfaceContainerHighest == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'surfaceVariant'
+ newName: 'surfaceContainerHighest'
+ - if: "surfaceContainerHighest != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'surfaceVariant'
+ variables:
+ surfaceContainerHighest:
+ kind: 'fragment'
+ value: 'arguments[surfaceContainerHighest]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate background"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'highContrastDark'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'background'
+ newName: 'surface'
+ - if: "surface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'background'
+ variables:
+ surface:
+ kind: 'fragment'
+ value: 'arguments[surface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate onBackground"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'highContrastDark'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "onSurface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'onBackground'
+ newName: 'onSurface'
+ - if: "onSurface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'onBackground'
+ variables:
+ onSurface:
+ kind: 'fragment'
+ value: 'arguments[onSurface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate surfaceVariant"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ constructor: 'highContrastDark'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surfaceContainerHighest == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'surfaceVariant'
+ newName: 'surfaceContainerHighest'
+ - if: "surfaceContainerHighest != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'surfaceVariant'
+ variables:
+ surfaceContainerHighest:
+ kind: 'fragment'
+ value: 'arguments[surfaceContainerHighest]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate background"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ method: 'copyWith'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'background'
+ newName: 'surface'
+ - if: "surface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'background'
+ variables:
+ surface:
+ kind: 'fragment'
+ value: 'arguments[surface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate onBackground"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ method: 'copyWith'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "onSurface == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'onBackground'
+ newName: 'onSurface'
+ - if: "onSurface != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'onBackground'
+ variables:
+ onSurface:
+ kind: 'fragment'
+ value: 'arguments[onSurface]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate surfaceVariant"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ method: 'copyWith'
+ inClass: 'ColorScheme'
+ oneOf:
+ - if: "surfaceContainerHighest == ''"
+ changes:
+ - kind: 'renameParameter'
+ oldName: 'surfaceVariant'
+ newName: 'surfaceContainerHighest'
+ - if: "surfaceContainerHighest != ''"
+ changes:
+ - kind: 'removeParameter'
+ name: 'surfaceVariant'
+ variables:
+ surfaceContainerHighest:
+ kind: 'fragment'
+ value: 'arguments[surfaceContainerHighest]'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate 'background' to 'surface'"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ getter: 'background'
+ inClass: 'ColorScheme'
+ changes:
+ - kind: 'rename'
+ newName: 'surface'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate 'onBackground' to 'onSurface'"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ getter: 'onBackground'
+ inClass: 'ColorScheme'
+ changes:
+ - kind: 'rename'
+ newName: 'onSurface'
+
+ # Changes made in https://github.com/flutter/flutter/pull/138521
+ - title: "Migrate 'surfaceVariant' to 'surfaceContainerHighest'"
+ date: 2023-12-04
+ element:
+ uris: [ 'material.dart' ]
+ getter: 'surfaceVariant'
+ inClass: 'ColorScheme'
+ changes:
+ - kind: 'rename'
+ newName: 'surfaceContainerHighest'
+
# Changes made in https://github.com/flutter/flutter/pull/93427
- title: "Remove 'primaryVariant' and 'secondaryVariant'"
date: 2021-11-19
diff --git a/packages/flutter/lib/src/material/action_chip.dart b/packages/flutter/lib/src/material/action_chip.dart
index 31e85de..c819c48 100644
--- a/packages/flutter/lib/src/material/action_chip.dart
+++ b/packages/flutter/lib/src/material/action_chip.dart
@@ -280,7 +280,9 @@
? null
: _colors.onSurface.withOpacity(0.12);
}
- return null;
+ return _chipVariant == _ChipVariant.flat
+ ? null
+ : _colors.surfaceContainerLow;
});
@override
@@ -289,7 +291,7 @@
: _colors.shadow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get checkmarkColor => null;
diff --git a/packages/flutter/lib/src/material/app_bar.dart b/packages/flutter/lib/src/material/app_bar.dart
index 1f5c8dc..286d8c4 100644
--- a/packages/flutter/lib/src/material/app_bar.dart
+++ b/packages/flutter/lib/src/material/app_bar.dart
@@ -848,6 +848,17 @@
defaults.backgroundColor!,
);
+ final Color scrolledUnderBackground = _resolveColor(
+ states,
+ widget.backgroundColor,
+ appBarTheme.backgroundColor,
+ Theme.of(context).colorScheme.surfaceContainer,
+ );
+
+ final Color effectiveBackgroundColor = states.contains(MaterialState.scrolledUnder)
+ ? scrolledUnderBackground
+ : backgroundColor;
+
final Color foregroundColor = widget.foregroundColor
?? appBarTheme.foregroundColor
?? defaults.foregroundColor!;
@@ -1113,7 +1124,7 @@
?? appBarTheme.systemOverlayStyle
?? defaults.systemOverlayStyle
?? _systemOverlayStyleForBrightness(
- ThemeData.estimateBrightnessForColor(backgroundColor),
+ ThemeData.estimateBrightnessForColor(effectiveBackgroundColor),
// Make the status bar transparent for M3 so the elevation overlay
// color is picked up by the statusbar.
theme.useMaterial3 ? const Color(0x00000000) : null,
@@ -1124,7 +1135,7 @@
child: AnnotatedRegion<SystemUiOverlayStyle>(
value: overlayStyle,
child: Material(
- color: backgroundColor,
+ color: theme.useMaterial3 ? effectiveBackgroundColor : backgroundColor,
elevation: effectiveElevation,
type: widget.forceMaterialTransparency
? MaterialType.transparency
@@ -1134,7 +1145,10 @@
?? defaults.shadowColor,
surfaceTintColor: widget.surfaceTintColor
?? appBarTheme.surfaceTintColor
- ?? defaults.surfaceTintColor,
+ // M3 `defaults.surfaceTint` is Colors.transparent now. It is not used
+ // here because otherwise, it will cause breaking change for
+ // `scrolledUnderElevation`.
+ ?? (theme.useMaterial3 ? theme.colorScheme.surfaceTint : null),
shape: widget.shape ?? appBarTheme.shape ?? defaults.shape,
child: Semantics(
explicitChildNodes: true,
@@ -2341,7 +2355,7 @@
Color? get shadowColor => Colors.transparent;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
IconThemeData? get iconTheme => IconThemeData(
diff --git a/packages/flutter/lib/src/material/banner.dart b/packages/flutter/lib/src/material/banner.dart
index 7ff0a5c..67d15b8 100644
--- a/packages/flutter/lib/src/material/banner.dart
+++ b/packages/flutter/lib/src/material/banner.dart
@@ -6,6 +6,7 @@
import 'banner_theme.dart';
import 'color_scheme.dart';
+import 'colors.dart';
import 'divider.dart';
import 'material.dart';
import 'scaffold.dart';
@@ -153,16 +154,18 @@
/// The color of the surface of this [MaterialBanner].
///
/// If `null`, [MaterialBannerThemeData.backgroundColor] is used. If that is
- /// also `null`, [ColorScheme.surface] of [ThemeData.colorScheme] is used.
+ /// also `null`, [ColorScheme.surfaceContainerLow] of [ThemeData.colorScheme] is used.
final Color? backgroundColor;
/// The color used as an overlay on [backgroundColor] to indicate elevation.
///
/// If null, [MaterialBannerThemeData.surfaceTintColor] is used. If that
- /// is also null, the default value is [ColorScheme.surfaceTint].
+ /// is also null, the default value is [Colors.transparent].
///
- /// See [Material.surfaceTintColor] for more details on how this
- /// overlay is applied.
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
final Color? surfaceTintColor;
/// The color of the shadow below the [MaterialBanner].
@@ -483,10 +486,10 @@
late final TextTheme _textTheme = Theme.of(context).textTheme;
@override
- Color? get backgroundColor => _colors.surface;
+ Color? get backgroundColor => _colors.surfaceContainerLow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get dividerColor => _colors.outlineVariant;
diff --git a/packages/flutter/lib/src/material/bottom_app_bar.dart b/packages/flutter/lib/src/material/bottom_app_bar.dart
index 835526f..c67079f 100644
--- a/packages/flutter/lib/src/material/bottom_app_bar.dart
+++ b/packages/flutter/lib/src/material/bottom_app_bar.dart
@@ -131,18 +131,17 @@
/// A custom color for the Material 3 surface-tint elevation effect.
///
- /// In Material 3, a "surface tint" with an opacity related to [elevation]
- /// will be applied to the [BottomAppBar]'s background.
- /// Use this property to override the default color of that tint.
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
///
/// If this property is null, then [BottomAppBarTheme.surfaceTintColor]
- /// of [ThemeData.bottomAppBarTheme] is used.
- /// If that is also null, [ColorScheme.surfaceTint] is used.
+ /// of [ThemeData.bottomAppBarTheme] is used. If that is also null, the default
+ /// value is [Colors.transparent].
///
/// Ignored if [ThemeData.useMaterial3] is false.
///
- /// The default is null.
- ///
/// See [Material.surfaceTintColor] for more details on how this overlay is applied.
final Color? surfaceTintColor;
@@ -310,10 +309,10 @@
late final ColorScheme _colors = Theme.of(context).colorScheme;
@override
- Color? get color => _colors.surface;
+ Color? get color => _colors.surfaceContainer;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get shadowColor => Colors.transparent;
diff --git a/packages/flutter/lib/src/material/bottom_sheet.dart b/packages/flutter/lib/src/material/bottom_sheet.dart
index 0f40afe..1d62275 100644
--- a/packages/flutter/lib/src/material/bottom_sheet.dart
+++ b/packages/flutter/lib/src/material/bottom_sheet.dart
@@ -147,8 +147,7 @@
/// The bottom sheet drag handle's color.
///
/// Defaults to [BottomSheetThemeData.dragHandleColor].
- /// If that is also null, defaults to [ColorScheme.onSurfaceVariant]
- /// with an opacity of 0.4.
+ /// If that is also null, defaults to [ColorScheme.onSurfaceVariant].
final Color? dragHandleColor;
/// Defaults to [BottomSheetThemeData.dragHandleSize].
@@ -1405,16 +1404,16 @@
late final ColorScheme _colors = Theme.of(context).colorScheme;
@override
- Color? get backgroundColor => _colors.surface;
+ Color? get backgroundColor => _colors.surfaceContainerLow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get shadowColor => Colors.transparent;
@override
- Color? get dragHandleColor => _colors.onSurfaceVariant.withOpacity(0.4);
+ Color? get dragHandleColor => _colors.onSurfaceVariant;
@override
Size? get dragHandleSize => const Size(32, 4);
diff --git a/packages/flutter/lib/src/material/card.dart b/packages/flutter/lib/src/material/card.dart
index 95667be..36a01d0 100644
--- a/packages/flutter/lib/src/material/card.dart
+++ b/packages/flutter/lib/src/material/card.dart
@@ -119,14 +119,8 @@
///
/// Defines the card's [Material.color].
///
- /// In Material 3, [surfaceTintColor] is drawn on top of this color
- /// when the card is elevated. This might make the appearance of
- /// the card slightly different than in Material 2. To disable this
- /// feature, set [surfaceTintColor] to [Colors.transparent].
- /// See [Material.surfaceTintColor] for more details.
- ///
/// If this property is null then the ambient [CardTheme.color] is used. If that is null,
- /// and [ThemeData.useMaterial3] is true, then [ColorScheme.surface] of
+ /// and [ThemeData.useMaterial3] is true, then [ColorScheme.surfaceContainerLow] of
/// [ThemeData.colorScheme] is used. Otherwise, [ThemeData.cardColor] is used.
final Color? color;
@@ -139,11 +133,16 @@
/// The color used as an overlay on [color] to indicate elevation.
///
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
+ ///
/// If this is null, no overlay will be applied. Otherwise this color
/// will be composited on top of [color] with an opacity related
/// to [elevation] and used to paint the background of the card.
///
- /// The default is null.
+ /// The default is [Colors.transparent].
///
/// See [Material.surfaceTintColor] for more details on how this
/// overlay is applied.
@@ -286,13 +285,13 @@
late final ColorScheme _colors = Theme.of(context).colorScheme;
@override
- Color? get color => _colors.surface;
+ Color? get color => _colors.surfaceContainerLow;
@override
Color? get shadowColor => _colors.shadow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
ShapeBorder? get shape =>const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12.0)));
@@ -319,7 +318,7 @@
late final ColorScheme _colors = Theme.of(context).colorScheme;
@override
- Color? get color => _colors.surfaceVariant;
+ Color? get color => _colors.surfaceContainerHighest;
@override
Color? get shadowColor => _colors.shadow;
@@ -358,7 +357,7 @@
Color? get shadowColor => _colors.shadow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
ShapeBorder? get shape =>
diff --git a/packages/flutter/lib/src/material/checkbox.dart b/packages/flutter/lib/src/material/checkbox.dart
index b898e2c..5d289ac 100644
--- a/packages/flutter/lib/src/material/checkbox.dart
+++ b/packages/flutter/lib/src/material/checkbox.dart
@@ -975,35 +975,35 @@
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.error)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.error.withOpacity(0.12);
+ return _colors.error.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.error.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.error.withOpacity(0.12);
+ return _colors.error.withOpacity(0.1);
}
}
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return Colors.transparent;
}
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
return Colors.transparent;
});
diff --git a/packages/flutter/lib/src/material/chip.dart b/packages/flutter/lib/src/material/chip.dart
index 52a405a..5fdf181 100644
--- a/packages/flutter/lib/src/material/chip.dart
+++ b/packages/flutter/lib/src/material/chip.dart
@@ -212,9 +212,12 @@
/// Color of the chip's surface tint overlay when its elevation is
/// greater than 0.
///
- /// If this is null and [ThemeData.useMaterial3] is true, then
- /// [ColorScheme.surfaceTint] color is used. Otherwise, it defaults
- /// to null.
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
+ ///
+ /// If this is null, defaults to [Colors.transparent].
Color? get surfaceTintColor;
/// Theme used for all icons in the chip.
@@ -2374,7 +2377,7 @@
Color? get shadowColor => Colors.transparent;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get checkmarkColor => null;
diff --git a/packages/flutter/lib/src/material/choice_chip.dart b/packages/flutter/lib/src/material/choice_chip.dart
index fa03a13..14885ec 100644
--- a/packages/flutter/lib/src/material/choice_chip.dart
+++ b/packages/flutter/lib/src/material/choice_chip.dart
@@ -307,7 +307,7 @@
}
return _chipVariant == _ChipVariant.flat
? null
- : null;
+ : _colors.surfaceContainerLow;
});
@override
@@ -316,7 +316,7 @@
: _colors.shadow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get checkmarkColor => isEnabled
diff --git a/packages/flutter/lib/src/material/color_scheme.dart b/packages/flutter/lib/src/material/color_scheme.dart
index 4b6a0ff..eaa01ac 100644
--- a/packages/flutter/lib/src/material/color_scheme.dart
+++ b/packages/flutter/lib/src/material/color_scheme.dart
@@ -13,7 +13,7 @@
import 'theme_data.dart';
/// {@template flutter.material.color_scheme.ColorScheme}
-/// A set of colors based on the
+/// A set of 45 colors based on the
/// [Material spec](https://m3.material.io/styles/color/the-color-system/color-roles)
/// that can be used to configure the color properties of most components.
/// {@endtemplate}
@@ -64,6 +64,13 @@
/// with on '-Fixed' roles, such as [onPrimaryFixed], they provide a
/// lower-emphasis option for text and icons.
///
+/// {@tool dartpad}
+/// This example shows all Material [ColorScheme] roles in light and dark
+/// brightnesses.
+///
+/// ** See code in examples/api/lib/material/color_scheme/color_scheme.0.dart **
+/// {@end-tool}
+///
/// ### Setting Colors in Flutter
///
///{@macro flutter.material.colors.settingColors}
@@ -95,10 +102,11 @@
/// * [onSecondary]
/// * [error]
/// * [onError]
- /// * [background]
- /// * [onBackground]
/// * [surface]
/// * [onSurface]
+ /// DEPRECATED:
+ /// * [background]
+ /// * [onBackground]
const ColorScheme({
required this.brightness,
required this.primary,
@@ -129,8 +137,6 @@
required this.onError,
Color? errorContainer,
Color? onErrorContainer,
- required this.background,
- required this.onBackground,
required this.surface,
required this.onSurface,
Color? surfaceDim,
@@ -140,7 +146,6 @@
Color? surfaceContainer,
Color? surfaceContainerHigh,
Color? surfaceContainerHighest,
- Color? surfaceVariant,
Color? onSurfaceVariant,
Color? outline,
Color? outlineVariant,
@@ -150,6 +155,21 @@
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background,
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant,
}) : _primaryContainer = primaryContainer,
_onPrimaryContainer = onPrimaryContainer,
_primaryFixed = primaryFixed,
@@ -179,7 +199,6 @@
_surfaceContainer = surfaceContainer,
_surfaceContainerHigh = surfaceContainerHigh,
_surfaceContainerHighest = surfaceContainerHighest,
- _surfaceVariant = surfaceVariant,
_onSurfaceVariant = onSurfaceVariant,
_outline = outline,
_outlineVariant = outlineVariant,
@@ -188,7 +207,11 @@
_inverseSurface = inverseSurface,
_onInverseSurface = onInverseSurface,
_inversePrimary = inversePrimary,
- _surfaceTint = surfaceTint;
+ _surfaceTint = surfaceTint,
+ // DEPRECATED (newest deprecations at the bottom)
+ _background = background,
+ _onBackground = onBackground,
+ _surfaceVariant = surfaceVariant;
/// Generate a [ColorScheme] derived from the given `seedColor`.
///
@@ -219,25 +242,41 @@
Color? onPrimary,
Color? primaryContainer,
Color? onPrimaryContainer,
+ Color? primaryFixed,
+ Color? primaryFixedDim,
+ Color? onPrimaryFixed,
+ Color? onPrimaryFixedVariant,
Color? secondary,
Color? onSecondary,
Color? secondaryContainer,
Color? onSecondaryContainer,
+ Color? secondaryFixed,
+ Color? secondaryFixedDim,
+ Color? onSecondaryFixed,
+ Color? onSecondaryFixedVariant,
Color? tertiary,
Color? onTertiary,
Color? tertiaryContainer,
Color? onTertiaryContainer,
+ Color? tertiaryFixed,
+ Color? tertiaryFixedDim,
+ Color? onTertiaryFixed,
+ Color? onTertiaryFixedVariant,
Color? error,
Color? onError,
Color? errorContainer,
Color? onErrorContainer,
Color? outline,
Color? outlineVariant,
- Color? background,
- Color? onBackground,
Color? surface,
Color? onSurface,
- Color? surfaceVariant,
+ Color? surfaceDim,
+ Color? surfaceBright,
+ Color? surfaceContainerLowest,
+ Color? surfaceContainerLow,
+ Color? surfaceContainer,
+ Color? surfaceContainerHigh,
+ Color? surfaceContainerHighest,
Color? onSurfaceVariant,
Color? inverseSurface,
Color? onInverseSurface,
@@ -245,43 +284,82 @@
Color? shadow,
Color? scrim,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background,
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant,
}) {
- final Scheme scheme = switch (brightness) {
- Brightness.light => Scheme.light(seedColor.value),
- Brightness.dark => Scheme.dark(seedColor.value),
- };
+ final SchemeTonalSpot scheme;
+ switch (brightness) {
+ case Brightness.light:
+ scheme = SchemeTonalSpot(sourceColorHct: Hct.fromInt(seedColor.value), isDark: false, contrastLevel: 0.0);
+ case Brightness.dark:
+ scheme = SchemeTonalSpot(sourceColorHct: Hct.fromInt(seedColor.value), isDark: true, contrastLevel: 0.0);
+ }
+
return ColorScheme(
- primary: primary ?? Color(scheme.primary),
- onPrimary: onPrimary ?? Color(scheme.onPrimary),
- primaryContainer: primaryContainer ?? Color(scheme.primaryContainer),
- onPrimaryContainer: onPrimaryContainer ?? Color(scheme.onPrimaryContainer),
- secondary: secondary ?? Color(scheme.secondary),
- onSecondary: onSecondary ?? Color(scheme.onSecondary),
- secondaryContainer: secondaryContainer ?? Color(scheme.secondaryContainer),
- onSecondaryContainer: onSecondaryContainer ?? Color(scheme.onSecondaryContainer),
- tertiary: tertiary ?? Color(scheme.tertiary),
- onTertiary: onTertiary ?? Color(scheme.onTertiary),
- tertiaryContainer: tertiaryContainer ?? Color(scheme.tertiaryContainer),
- onTertiaryContainer: onTertiaryContainer ?? Color(scheme.onTertiaryContainer),
- error: error ?? Color(scheme.error),
- onError: onError ?? Color(scheme.onError),
- errorContainer: errorContainer ?? Color(scheme.errorContainer),
- onErrorContainer: onErrorContainer ?? Color(scheme.onErrorContainer),
- outline: outline ?? Color(scheme.outline),
- outlineVariant: outlineVariant ?? Color(scheme.outlineVariant),
- background: background ?? Color(scheme.background),
- onBackground: onBackground ?? Color(scheme.onBackground),
- surface: surface ?? Color(scheme.surface),
- onSurface: onSurface ?? Color(scheme.onSurface),
- surfaceVariant: surfaceVariant ?? Color(scheme.surfaceVariant),
- onSurfaceVariant: onSurfaceVariant ?? Color(scheme.onSurfaceVariant),
- inverseSurface: inverseSurface ?? Color(scheme.inverseSurface),
- onInverseSurface: onInverseSurface ?? Color(scheme.inverseOnSurface),
- inversePrimary: inversePrimary ?? Color(scheme.inversePrimary),
- shadow: shadow ?? Color(scheme.shadow),
- scrim: scrim ?? Color(scheme.scrim),
- surfaceTint: surfaceTint ?? Color(scheme.primary),
+ primary: primary ?? Color(MaterialDynamicColors.primary.getArgb(scheme)),
+ onPrimary: onPrimary ?? Color(MaterialDynamicColors.onPrimary.getArgb(scheme)),
+ primaryContainer: primaryContainer ?? Color(MaterialDynamicColors.primaryContainer.getArgb(scheme)),
+ onPrimaryContainer: onPrimaryContainer ?? Color(MaterialDynamicColors.onPrimaryContainer.getArgb(scheme)),
+ primaryFixed: primaryFixed ?? Color(MaterialDynamicColors.primaryFixed.getArgb(scheme)),
+ primaryFixedDim: primaryFixedDim ?? Color(MaterialDynamicColors.primaryFixedDim.getArgb(scheme)),
+ onPrimaryFixed: onPrimaryFixed ?? Color(MaterialDynamicColors.onPrimaryFixed.getArgb(scheme)),
+ onPrimaryFixedVariant: onPrimaryFixedVariant ?? Color(MaterialDynamicColors.onPrimaryFixedVariant.getArgb(scheme)),
+ secondary: secondary ?? Color(MaterialDynamicColors.secondary.getArgb(scheme)),
+ onSecondary: onSecondary ?? Color(MaterialDynamicColors.onSecondary.getArgb(scheme)),
+ secondaryContainer: secondaryContainer ?? Color(MaterialDynamicColors.secondaryContainer.getArgb(scheme)),
+ onSecondaryContainer: onSecondaryContainer ?? Color(MaterialDynamicColors.onSecondaryContainer.getArgb(scheme)),
+ secondaryFixed: secondaryFixed ?? Color(MaterialDynamicColors.secondaryFixed.getArgb(scheme)),
+ secondaryFixedDim: secondaryFixedDim ?? Color(MaterialDynamicColors.secondaryFixedDim.getArgb(scheme)),
+ onSecondaryFixed: onSecondaryFixed ?? Color(MaterialDynamicColors.onSecondaryFixed.getArgb(scheme)),
+ onSecondaryFixedVariant: onSecondaryFixedVariant ?? Color(MaterialDynamicColors.onSecondaryFixedVariant.getArgb(scheme)),
+ tertiary: tertiary ?? Color(MaterialDynamicColors.tertiary.getArgb(scheme)),
+ onTertiary: onTertiary ?? Color(MaterialDynamicColors.onTertiary.getArgb(scheme)),
+ tertiaryContainer: tertiaryContainer ?? Color(MaterialDynamicColors.tertiaryContainer.getArgb(scheme)),
+ onTertiaryContainer: onTertiaryContainer ?? Color(MaterialDynamicColors.onTertiaryContainer.getArgb(scheme)),
+ tertiaryFixed: tertiaryFixed ?? Color(MaterialDynamicColors.tertiaryFixed.getArgb(scheme)),
+ tertiaryFixedDim: tertiaryFixedDim ?? Color(MaterialDynamicColors.tertiaryFixedDim.getArgb(scheme)),
+ onTertiaryFixed: onTertiaryFixed ?? Color(MaterialDynamicColors.onTertiaryFixed.getArgb(scheme)),
+ onTertiaryFixedVariant: onTertiaryFixedVariant ?? Color(MaterialDynamicColors.onTertiaryFixedVariant.getArgb(scheme)),
+ error: error ?? Color(MaterialDynamicColors.error.getArgb(scheme)),
+ onError: onError ?? Color(MaterialDynamicColors.onError.getArgb(scheme)),
+ errorContainer: errorContainer ?? Color(MaterialDynamicColors.errorContainer.getArgb(scheme)),
+ onErrorContainer: onErrorContainer ?? Color(MaterialDynamicColors.onErrorContainer.getArgb(scheme)),
+ outline: outline ?? Color(MaterialDynamicColors.outline.getArgb(scheme)),
+ outlineVariant: outlineVariant ?? Color(MaterialDynamicColors.outlineVariant.getArgb(scheme)),
+ surface: surface ?? Color(MaterialDynamicColors.surface.getArgb(scheme)),
+ surfaceDim: surfaceDim ?? Color(MaterialDynamicColors.surfaceDim.getArgb(scheme)),
+ surfaceBright: surfaceBright ?? Color(MaterialDynamicColors.surfaceBright.getArgb(scheme)),
+ surfaceContainerLowest: surfaceContainerLowest ?? Color(MaterialDynamicColors.surfaceContainerLowest.getArgb(scheme)),
+ surfaceContainerLow: surfaceContainerLow ?? Color(MaterialDynamicColors.surfaceContainerLow.getArgb(scheme)),
+ surfaceContainer: surfaceContainer ?? Color(MaterialDynamicColors.surfaceContainer.getArgb(scheme)),
+ surfaceContainerHigh: surfaceContainerHigh ?? Color(MaterialDynamicColors.surfaceContainerHigh.getArgb(scheme)),
+ surfaceContainerHighest: surfaceContainerHighest ?? Color(MaterialDynamicColors.surfaceContainerHighest.getArgb(scheme)),
+ onSurface: onSurface ?? Color(MaterialDynamicColors.onSurface.getArgb(scheme)),
+ onSurfaceVariant: onSurfaceVariant ?? Color(MaterialDynamicColors.onSurfaceVariant.getArgb(scheme)),
+ inverseSurface: inverseSurface ?? Color(MaterialDynamicColors.inverseSurface.getArgb(scheme)),
+ onInverseSurface: onInverseSurface ?? Color(MaterialDynamicColors.inverseOnSurface.getArgb(scheme)),
+ inversePrimary: inversePrimary ?? Color(MaterialDynamicColors.inversePrimary.getArgb(scheme)),
+ shadow: shadow ?? Color(MaterialDynamicColors.shadow.getArgb(scheme)),
+ scrim: scrim ?? Color(MaterialDynamicColors.scrim.getArgb(scheme)),
+ surfaceTint: surfaceTint ?? Color(MaterialDynamicColors.primary.getArgb(scheme)),
brightness: brightness,
+ // DEPRECATED (newest deprecations at the bottom)
+ background: background ?? Color(MaterialDynamicColors.background.getArgb(scheme)),
+ onBackground: onBackground ?? Color(MaterialDynamicColors.onBackground.getArgb(scheme)),
+ surfaceVariant: surfaceVariant ?? Color(MaterialDynamicColors.surfaceVariant.getArgb(scheme)),
);
}
@@ -338,8 +416,6 @@
this.onError = Colors.white,
Color? errorContainer,
Color? onErrorContainer,
- this.background = Colors.white,
- this.onBackground = Colors.black,
this.surface = Colors.white,
this.onSurface = Colors.black,
Color? surfaceDim,
@@ -349,7 +425,6 @@
Color? surfaceContainer,
Color? surfaceContainerHigh,
Color? surfaceContainerHighest,
- Color? surfaceVariant,
Color? onSurfaceVariant,
Color? outline,
Color? outlineVariant,
@@ -359,6 +434,21 @@
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background = Colors.white,
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground = Colors.black,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant
}) : _primaryContainer = primaryContainer,
_onPrimaryContainer = onPrimaryContainer,
_primaryFixed = primaryFixed,
@@ -388,7 +478,6 @@
_surfaceContainer = surfaceContainer,
_surfaceContainerHigh = surfaceContainerHigh,
_surfaceContainerHighest = surfaceContainerHighest,
- _surfaceVariant = surfaceVariant,
_onSurfaceVariant = onSurfaceVariant,
_outline = outline,
_outlineVariant = outlineVariant,
@@ -397,7 +486,11 @@
_inverseSurface = inverseSurface,
_onInverseSurface = onInverseSurface,
_inversePrimary = inversePrimary,
- _surfaceTint = surfaceTint;
+ _surfaceTint = surfaceTint,
+ // DEPRECATED (newest deprecations at the bottom)
+ _background = background,
+ _onBackground = onBackground,
+ _surfaceVariant = surfaceVariant;
/// Create the dark color scheme that matches the
/// [baseline Material 2 color scheme](https://material.io/design/color/dark-theme.html#ui-application).
@@ -457,8 +550,6 @@
this.onError = Colors.black,
Color? errorContainer,
Color? onErrorContainer,
- this.background = const Color(0xff121212),
- this.onBackground = Colors.white,
this.surface = const Color(0xff121212),
this.onSurface = Colors.white,
Color? surfaceDim,
@@ -468,7 +559,6 @@
Color? surfaceContainer,
Color? surfaceContainerHigh,
Color? surfaceContainerHighest,
- Color? surfaceVariant,
Color? onSurfaceVariant,
Color? outline,
Color? outlineVariant,
@@ -478,6 +568,21 @@
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background = const Color(0xff121212),
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground = Colors.white,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant,
}) : _primaryContainer = primaryContainer,
_onPrimaryContainer = onPrimaryContainer,
_primaryFixed = primaryFixed,
@@ -507,7 +612,6 @@
_surfaceContainer = surfaceContainer,
_surfaceContainerHigh = surfaceContainerHigh,
_surfaceContainerHighest = surfaceContainerHighest,
- _surfaceVariant = surfaceVariant,
_onSurfaceVariant = onSurfaceVariant,
_outline = outline,
_outlineVariant = outlineVariant,
@@ -516,7 +620,11 @@
_inverseSurface = inverseSurface,
_onInverseSurface = onInverseSurface,
_inversePrimary = inversePrimary,
- _surfaceTint = surfaceTint;
+ _surfaceTint = surfaceTint,
+ // DEPRECATED (newest deprecations at the bottom)
+ _background = background,
+ _onBackground = onBackground,
+ _surfaceVariant = surfaceVariant;
/// Create a high contrast ColorScheme based on a purple primary color that
/// matches the [baseline Material 2 color scheme](https://material.io/design/color/the-color-system.html#color-theme-creation).
@@ -571,8 +679,6 @@
this.onError = Colors.white,
Color? errorContainer,
Color? onErrorContainer,
- this.background = Colors.white,
- this.onBackground = Colors.black,
this.surface = Colors.white,
this.onSurface = Colors.black,
Color? surfaceDim,
@@ -582,7 +688,6 @@
Color? surfaceContainer,
Color? surfaceContainerHigh,
Color? surfaceContainerHighest,
- Color? surfaceVariant,
Color? onSurfaceVariant,
Color? outline,
Color? outlineVariant,
@@ -592,6 +697,21 @@
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background = Colors.white,
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground = Colors.black,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant,
}) : _primaryContainer = primaryContainer,
_onPrimaryContainer = onPrimaryContainer,
_primaryFixed = primaryFixed,
@@ -621,7 +741,6 @@
_surfaceContainer = surfaceContainer,
_surfaceContainerHigh = surfaceContainerHigh,
_surfaceContainerHighest = surfaceContainerHighest,
- _surfaceVariant = surfaceVariant,
_onSurfaceVariant = onSurfaceVariant,
_outline = outline,
_outlineVariant = outlineVariant,
@@ -630,7 +749,11 @@
_inverseSurface = inverseSurface,
_onInverseSurface = onInverseSurface,
_inversePrimary = inversePrimary,
- _surfaceTint = surfaceTint;
+ _surfaceTint = surfaceTint,
+ // DEPRECATED (newest deprecations at the bottom)
+ _background = background,
+ _onBackground = onBackground,
+ _surfaceVariant = surfaceVariant;
/// Create a high contrast ColorScheme based on the dark
/// [baseline Material 2 color scheme](https://material.io/design/color/dark-theme.html#ui-application).
@@ -690,8 +813,6 @@
this.onError = Colors.black,
Color? errorContainer,
Color? onErrorContainer,
- this.background = const Color(0xff121212),
- this.onBackground = Colors.white,
this.surface = const Color(0xff121212),
this.onSurface = Colors.white,
Color? surfaceDim,
@@ -701,7 +822,6 @@
Color? surfaceContainer,
Color? surfaceContainerHigh,
Color? surfaceContainerHighest,
- Color? surfaceVariant,
Color? onSurfaceVariant,
Color? outline,
Color? outlineVariant,
@@ -711,6 +831,21 @@
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background = const Color(0xff121212),
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground = Colors.white,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant,
}) : _primaryContainer = primaryContainer,
_onPrimaryContainer = onPrimaryContainer,
_primaryFixed = primaryFixed,
@@ -740,7 +875,6 @@
_surfaceContainer = surfaceContainer,
_surfaceContainerHigh = surfaceContainerHigh,
_surfaceContainerHighest = surfaceContainerHighest,
- _surfaceVariant = surfaceVariant,
_onSurfaceVariant = onSurfaceVariant,
_outline = outline,
_outlineVariant = outlineVariant,
@@ -749,7 +883,11 @@
_inverseSurface = inverseSurface,
_onInverseSurface = onInverseSurface,
_inversePrimary = inversePrimary,
- _surfaceTint = surfaceTint;
+ _surfaceTint = surfaceTint,
+ // DEPRECATED (newest deprecations at the bottom)
+ _background = background,
+ _onBackground = onBackground,
+ _surfaceVariant = surfaceVariant;
/// Creates a color scheme from a [MaterialColor] swatch.
///
@@ -778,14 +916,15 @@
primary: primarySwatch,
secondary: secondary,
surface: cardColor ?? (isDark ? Colors.grey[800]! : Colors.white),
- background: backgroundColor ?? (isDark ? Colors.grey[700]! : primarySwatch[200]!),
error: errorColor ?? Colors.red[700]!,
onPrimary: primaryIsDark ? Colors.white : Colors.black,
onSecondary: secondaryIsDark ? Colors.white : Colors.black,
onSurface: isDark ? Colors.white : Colors.black,
- onBackground: primaryIsDark ? Colors.white : Colors.black,
onError: isDark ? Colors.black : Colors.white,
brightness: brightness,
+ // DEPRECATED (newest deprecations at the bottom)
+ background: backgroundColor ?? (isDark ? Colors.grey[700]! : primarySwatch[200]!),
+ onBackground: primaryIsDark ? Colors.white : Colors.black,
);
}
@@ -949,16 +1088,6 @@
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
Color get onErrorContainer => _onErrorContainer ?? onError;
- /// A color that typically appears behind scrollable content.
- final Color background;
-
- /// A color that's clearly legible when drawn on [background].
- ///
- /// To ensure that an app is accessible, a contrast ratio between
- /// [background] and [onBackground] of at least 4.5:1 is recommended. See
- /// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
- final Color onBackground;
-
/// The background color for widgets like [Card].
final Color surface;
@@ -972,6 +1101,10 @@
final Color? _surfaceVariant;
/// A color variant of [surface] that can be used for differentiation against
/// a component using [surface].
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
Color get surfaceVariant => _surfaceVariant ?? surface;
final Color? _surfaceDim;
@@ -1064,6 +1197,26 @@
/// elevation.
Color get surfaceTint => _surfaceTint ?? primary;
+ final Color? _background;
+ /// A color that typically appears behind scrollable content.
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color get background => _background ?? surface;
+
+ final Color? _onBackground;
+ /// A color that's clearly legible when drawn on [background].
+ ///
+ /// To ensure that an app is accessible, a contrast ratio between
+ /// [background] and [onBackground] of at least 4.5:1 is recommended. See
+ /// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color get onBackground => _onBackground ?? onSurface;
+
/// Creates a copy of this color scheme with the given fields
/// replaced by the non-null parameter values.
ColorScheme copyWith({
@@ -1096,8 +1249,6 @@
Color? onError,
Color? errorContainer,
Color? onErrorContainer,
- Color? background,
- Color? onBackground,
Color? surface,
Color? onSurface,
Color? surfaceDim,
@@ -1107,7 +1258,6 @@
Color? surfaceContainer,
Color? surfaceContainerHigh,
Color? surfaceContainerHighest,
- Color? surfaceVariant,
Color? onSurfaceVariant,
Color? outline,
Color? outlineVariant,
@@ -1117,6 +1267,21 @@
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background,
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant,
}) {
return ColorScheme(
brightness: brightness ?? this.brightness,
@@ -1148,8 +1313,6 @@
onError : onError ?? this.onError,
errorContainer : errorContainer ?? this.errorContainer,
onErrorContainer : onErrorContainer ?? this.onErrorContainer,
- background : background ?? this.background,
- onBackground : onBackground ?? this.onBackground,
surface : surface ?? this.surface,
onSurface : onSurface ?? this.onSurface,
surfaceDim : surfaceDim ?? this.surfaceDim,
@@ -1159,7 +1322,6 @@
surfaceContainer : surfaceContainer ?? this.surfaceContainer,
surfaceContainerHigh : surfaceContainerHigh ?? this.surfaceContainerHigh,
surfaceContainerHighest : surfaceContainerHighest ?? this.surfaceContainerHighest,
- surfaceVariant : surfaceVariant ?? this.surfaceVariant,
onSurfaceVariant : onSurfaceVariant ?? this.onSurfaceVariant,
outline : outline ?? this.outline,
outlineVariant : outlineVariant ?? this.outlineVariant,
@@ -1169,6 +1331,10 @@
onInverseSurface : onInverseSurface ?? this.onInverseSurface,
inversePrimary : inversePrimary ?? this.inversePrimary,
surfaceTint: surfaceTint ?? this.surfaceTint,
+ // DEPRECATED (newest deprecations at the bottom)
+ background : background ?? this.background,
+ onBackground : onBackground ?? this.onBackground,
+ surfaceVariant : surfaceVariant ?? this.surfaceVariant,
);
}
@@ -1209,8 +1375,6 @@
onError: Color.lerp(a.onError, b.onError, t)!,
errorContainer: Color.lerp(a.errorContainer, b.errorContainer, t),
onErrorContainer: Color.lerp(a.onErrorContainer, b.onErrorContainer, t),
- background: Color.lerp(a.background, b.background, t)!,
- onBackground: Color.lerp(a.onBackground, b.onBackground, t)!,
surface: Color.lerp(a.surface, b.surface, t)!,
onSurface: Color.lerp(a.onSurface, b.onSurface, t)!,
surfaceDim: Color.lerp(a.surfaceDim, b.surfaceDim, t),
@@ -1220,7 +1384,6 @@
surfaceContainer: Color.lerp(a.surfaceContainer, b.surfaceContainer, t),
surfaceContainerHigh: Color.lerp(a.surfaceContainerHigh, b.surfaceContainerHigh, t),
surfaceContainerHighest: Color.lerp(a.surfaceContainerHighest, b.surfaceContainerHighest, t),
- surfaceVariant: Color.lerp(a.surfaceVariant, b.surfaceVariant, t),
onSurfaceVariant: Color.lerp(a.onSurfaceVariant, b.onSurfaceVariant, t),
outline: Color.lerp(a.outline, b.outline, t),
outlineVariant: Color.lerp(a.outlineVariant, b.outlineVariant, t),
@@ -1230,6 +1393,10 @@
onInverseSurface: Color.lerp(a.onInverseSurface, b.onInverseSurface, t),
inversePrimary: Color.lerp(a.inversePrimary, b.inversePrimary, t),
surfaceTint: Color.lerp(a.surfaceTint, b.surfaceTint, t),
+ // DEPRECATED (newest deprecations at the bottom)
+ background: Color.lerp(a.background, b.background, t),
+ onBackground: Color.lerp(a.onBackground, b.onBackground, t),
+ surfaceVariant: Color.lerp(a.surfaceVariant, b.surfaceVariant, t),
);
}
@@ -1271,8 +1438,6 @@
&& other.onError == onError
&& other.errorContainer == errorContainer
&& other.onErrorContainer == onErrorContainer
- && other.background == background
- && other.onBackground == onBackground
&& other.surface == surface
&& other.onSurface == onSurface
&& other.surfaceDim == surfaceDim
@@ -1282,7 +1447,6 @@
&& other.surfaceContainer == surfaceContainer
&& other.surfaceContainerHigh == surfaceContainerHigh
&& other.surfaceContainerHighest == surfaceContainerHighest
- && other.surfaceVariant == surfaceVariant
&& other.onSurfaceVariant == onSurfaceVariant
&& other.outline == outline
&& other.outlineVariant == outlineVariant
@@ -1291,7 +1455,11 @@
&& other.inverseSurface == inverseSurface
&& other.onInverseSurface == onInverseSurface
&& other.inversePrimary == inversePrimary
- && other.surfaceTint == surfaceTint;
+ && other.surfaceTint == surfaceTint
+ // DEPRECATED (newest deprecations at the bottom)
+ && other.background == background
+ && other.onBackground == onBackground
+ && other.surfaceVariant == surfaceVariant;
}
@override
@@ -1313,8 +1481,6 @@
onError,
errorContainer,
onErrorContainer,
- background,
- onBackground,
Object.hash(
surface,
onSurface,
@@ -1325,7 +1491,6 @@
surfaceContainer,
surfaceContainerHigh,
surfaceContainerHighest,
- surfaceVariant,
onSurfaceVariant,
outline,
outlineVariant,
@@ -1348,6 +1513,10 @@
tertiaryFixedDim,
onTertiaryFixed,
onTertiaryFixedVariant,
+ // DEPRECATED (newest deprecations at the bottom)
+ background,
+ onBackground,
+ surfaceVariant,
)
),
);
@@ -1385,8 +1554,6 @@
properties.add(ColorProperty('onError', onError, defaultValue: defaultScheme.onError));
properties.add(ColorProperty('errorContainer', errorContainer, defaultValue: defaultScheme.errorContainer));
properties.add(ColorProperty('onErrorContainer', onErrorContainer, defaultValue: defaultScheme.onErrorContainer));
- properties.add(ColorProperty('background', background, defaultValue: defaultScheme.background));
- properties.add(ColorProperty('onBackground', onBackground, defaultValue: defaultScheme.onBackground));
properties.add(ColorProperty('surface', surface, defaultValue: defaultScheme.surface));
properties.add(ColorProperty('onSurface', onSurface, defaultValue: defaultScheme.onSurface));
properties.add(ColorProperty('surfaceDim', surfaceDim, defaultValue: defaultScheme.surfaceDim));
@@ -1396,7 +1563,6 @@
properties.add(ColorProperty('surfaceContainer', surfaceContainer, defaultValue: defaultScheme.surfaceContainer));
properties.add(ColorProperty('surfaceContainerHigh', surfaceContainerHigh, defaultValue: defaultScheme.surfaceContainerHigh));
properties.add(ColorProperty('surfaceContainerHighest', surfaceContainerHighest, defaultValue: defaultScheme.surfaceContainerHighest));
- properties.add(ColorProperty('surfaceVariant', surfaceVariant, defaultValue: defaultScheme.surfaceVariant));
properties.add(ColorProperty('onSurfaceVariant', onSurfaceVariant, defaultValue: defaultScheme.onSurfaceVariant));
properties.add(ColorProperty('outline', outline, defaultValue: defaultScheme.outline));
properties.add(ColorProperty('outlineVariant', outlineVariant, defaultValue: defaultScheme.outlineVariant));
@@ -1406,6 +1572,10 @@
properties.add(ColorProperty('onInverseSurface', onInverseSurface, defaultValue: defaultScheme.onInverseSurface));
properties.add(ColorProperty('inversePrimary', inversePrimary, defaultValue: defaultScheme.inversePrimary));
properties.add(ColorProperty('surfaceTint', surfaceTint, defaultValue: defaultScheme.surfaceTint));
+ // DEPRECATED (newest deprecations at the bottom)
+ properties.add(ColorProperty('background', background, defaultValue: defaultScheme.background));
+ properties.add(ColorProperty('onBackground', onBackground, defaultValue: defaultScheme.onBackground));
+ properties.add(ColorProperty('surfaceVariant', surfaceVariant, defaultValue: defaultScheme.surfaceVariant));
}
/// Generate a [ColorScheme] derived from the given `imageProvider`.
@@ -1449,25 +1619,41 @@
Color? onPrimary,
Color? primaryContainer,
Color? onPrimaryContainer,
+ Color? primaryFixed,
+ Color? primaryFixedDim,
+ Color? onPrimaryFixed,
+ Color? onPrimaryFixedVariant,
Color? secondary,
Color? onSecondary,
Color? secondaryContainer,
Color? onSecondaryContainer,
+ Color? secondaryFixed,
+ Color? secondaryFixedDim,
+ Color? onSecondaryFixed,
+ Color? onSecondaryFixedVariant,
Color? tertiary,
Color? onTertiary,
Color? tertiaryContainer,
Color? onTertiaryContainer,
+ Color? tertiaryFixed,
+ Color? tertiaryFixedDim,
+ Color? onTertiaryFixed,
+ Color? onTertiaryFixedVariant,
Color? error,
Color? onError,
Color? errorContainer,
Color? onErrorContainer,
Color? outline,
Color? outlineVariant,
- Color? background,
- Color? onBackground,
Color? surface,
Color? onSurface,
- Color? surfaceVariant,
+ Color? surfaceDim,
+ Color? surfaceBright,
+ Color? surfaceContainerLowest,
+ Color? surfaceContainerLow,
+ Color? surfaceContainer,
+ Color? surfaceContainerHigh,
+ Color? surfaceContainerHighest,
Color? onSurfaceVariant,
Color? inverseSurface,
Color? onInverseSurface,
@@ -1475,6 +1661,21 @@
Color? shadow,
Color? scrim,
Color? surfaceTint,
+ @Deprecated(
+ 'Use surface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? background,
+ @Deprecated(
+ 'Use onSurface instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? onBackground,
+ @Deprecated(
+ 'Use surfaceContainerHighest instead. '
+ 'This feature was deprecated after v3.18.0-0.1.pre.'
+ )
+ Color? surfaceVariant,
}) async {
// Extract dominant colors from image.
final QuantizerResult quantizerResult =
@@ -1487,42 +1688,66 @@
final List<int> scoredResults = Score.score(colorToCount, desired: 1);
final ui.Color baseColor = Color(scoredResults.first);
- final Scheme scheme = switch (brightness) {
- Brightness.light => Scheme.light(baseColor.value),
- Brightness.dark => Scheme.dark(baseColor.value),
- };
+ final SchemeTonalSpot scheme;
+ switch (brightness) {
+ case Brightness.light:
+ scheme = SchemeTonalSpot(sourceColorHct: Hct.fromInt(baseColor.value), isDark: false, contrastLevel: 0.0);
+ case Brightness.dark:
+ scheme = SchemeTonalSpot(sourceColorHct: Hct.fromInt(baseColor.value), isDark: true, contrastLevel: 0.0);
+ }
- return ColorScheme(primary: primary ?? Color(scheme.primary),
- onPrimary: onPrimary ?? Color(scheme.onPrimary),
- primaryContainer: primaryContainer ?? Color(scheme.primaryContainer),
- onPrimaryContainer: onPrimaryContainer ?? Color(scheme.onPrimaryContainer),
- secondary: secondary ?? Color(scheme.secondary),
- onSecondary: onSecondary ?? Color(scheme.onSecondary),
- secondaryContainer: secondaryContainer ?? Color(scheme.secondaryContainer),
- onSecondaryContainer: onSecondaryContainer ?? Color(scheme.onSecondaryContainer),
- tertiary: tertiary ?? Color(scheme.tertiary),
- onTertiary: onTertiary ?? Color(scheme.onTertiary),
- tertiaryContainer: tertiaryContainer ?? Color(scheme.tertiaryContainer),
- onTertiaryContainer: onTertiaryContainer ?? Color(scheme.onTertiaryContainer),
- error: error ?? Color(scheme.error),
- onError: onError ?? Color(scheme.onError),
- errorContainer: errorContainer ?? Color(scheme.errorContainer),
- onErrorContainer: onErrorContainer ?? Color(scheme.onErrorContainer),
- outline: outline ?? Color(scheme.outline),
- outlineVariant: outlineVariant ?? Color(scheme.outlineVariant),
- background: background ?? Color(scheme.background),
- onBackground: onBackground ?? Color(scheme.onBackground),
- surface: surface ?? Color(scheme.surface),
- onSurface: onSurface ?? Color(scheme.onSurface),
- surfaceVariant: surfaceVariant ?? Color(scheme.surfaceVariant),
- onSurfaceVariant: onSurfaceVariant ?? Color(scheme.onSurfaceVariant),
- inverseSurface: inverseSurface ?? Color(scheme.inverseSurface),
- onInverseSurface: onInverseSurface ?? Color(scheme.inverseOnSurface),
- inversePrimary: inversePrimary ?? Color(scheme.inversePrimary),
- shadow: shadow ?? Color(scheme.shadow),
- scrim: scrim ?? Color(scheme.scrim),
- surfaceTint: surfaceTint ?? Color(scheme.primary),
+ return ColorScheme(
+ primary: primary ?? Color(MaterialDynamicColors.primary.getArgb(scheme)),
+ onPrimary: onPrimary ?? Color(MaterialDynamicColors.onPrimary.getArgb(scheme)),
+ primaryContainer: primaryContainer ?? Color(MaterialDynamicColors.primaryContainer.getArgb(scheme)),
+ onPrimaryContainer: onPrimaryContainer ?? Color(MaterialDynamicColors.onPrimaryContainer.getArgb(scheme)),
+ primaryFixed: primaryFixed ?? Color(MaterialDynamicColors.primaryFixed.getArgb(scheme)),
+ primaryFixedDim: primaryFixedDim ?? Color(MaterialDynamicColors.primaryFixedDim.getArgb(scheme)),
+ onPrimaryFixed: onPrimaryFixed ?? Color(MaterialDynamicColors.onPrimaryFixed.getArgb(scheme)),
+ onPrimaryFixedVariant: onPrimaryFixedVariant ?? Color(MaterialDynamicColors.onPrimaryFixedVariant.getArgb(scheme)),
+ secondary: secondary ?? Color(MaterialDynamicColors.secondary.getArgb(scheme)),
+ onSecondary: onSecondary ?? Color(MaterialDynamicColors.onSecondary.getArgb(scheme)),
+ secondaryContainer: secondaryContainer ?? Color(MaterialDynamicColors.secondaryContainer.getArgb(scheme)),
+ onSecondaryContainer: onSecondaryContainer ?? Color(MaterialDynamicColors.onSecondaryContainer.getArgb(scheme)),
+ secondaryFixed: secondaryFixed ?? Color(MaterialDynamicColors.secondaryFixed.getArgb(scheme)),
+ secondaryFixedDim: secondaryFixedDim ?? Color(MaterialDynamicColors.secondaryFixedDim.getArgb(scheme)),
+ onSecondaryFixed: onSecondaryFixed ?? Color(MaterialDynamicColors.onSecondaryFixed.getArgb(scheme)),
+ onSecondaryFixedVariant: onSecondaryFixedVariant ?? Color(MaterialDynamicColors.onSecondaryFixedVariant.getArgb(scheme)),
+ tertiary: tertiary ?? Color(MaterialDynamicColors.tertiary.getArgb(scheme)),
+ onTertiary: onTertiary ?? Color(MaterialDynamicColors.onTertiary.getArgb(scheme)),
+ tertiaryContainer: tertiaryContainer ?? Color(MaterialDynamicColors.tertiaryContainer.getArgb(scheme)),
+ onTertiaryContainer: onTertiaryContainer ?? Color(MaterialDynamicColors.onTertiaryContainer.getArgb(scheme)),
+ tertiaryFixed: tertiaryFixed ?? Color(MaterialDynamicColors.tertiaryFixed.getArgb(scheme)),
+ tertiaryFixedDim: tertiaryFixedDim ?? Color(MaterialDynamicColors.tertiaryFixedDim.getArgb(scheme)),
+ onTertiaryFixed: onTertiaryFixed ?? Color(MaterialDynamicColors.onTertiaryFixed.getArgb(scheme)),
+ onTertiaryFixedVariant: onTertiaryFixedVariant ?? Color(MaterialDynamicColors.onTertiaryFixedVariant.getArgb(scheme)),
+ error: error ?? Color(MaterialDynamicColors.error.getArgb(scheme)),
+ onError: onError ?? Color(MaterialDynamicColors.onError.getArgb(scheme)),
+ errorContainer: errorContainer ?? Color(MaterialDynamicColors.errorContainer.getArgb(scheme)),
+ onErrorContainer: onErrorContainer ?? Color(MaterialDynamicColors.onErrorContainer.getArgb(scheme)),
+ outline: outline ?? Color(MaterialDynamicColors.outline.getArgb(scheme)),
+ outlineVariant: outlineVariant ?? Color(MaterialDynamicColors.outlineVariant.getArgb(scheme)),
+ surface: surface ?? Color(MaterialDynamicColors.surface.getArgb(scheme)),
+ surfaceDim: surfaceDim ?? Color(MaterialDynamicColors.surfaceDim.getArgb(scheme)),
+ surfaceBright: surfaceBright ?? Color(MaterialDynamicColors.surfaceBright.getArgb(scheme)),
+ surfaceContainerLowest: surfaceContainerLowest ?? Color(MaterialDynamicColors.surfaceContainerLowest.getArgb(scheme)),
+ surfaceContainerLow: surfaceContainerLow ?? Color(MaterialDynamicColors.surfaceContainerLow.getArgb(scheme)),
+ surfaceContainer: surfaceContainer ?? Color(MaterialDynamicColors.surfaceContainer.getArgb(scheme)),
+ surfaceContainerHigh: surfaceContainerHigh ?? Color(MaterialDynamicColors.surfaceContainerHigh.getArgb(scheme)),
+ surfaceContainerHighest: surfaceContainerHighest ?? Color(MaterialDynamicColors.surfaceContainerHighest.getArgb(scheme)),
+ onSurface: onSurface ?? Color(MaterialDynamicColors.onSurface.getArgb(scheme)),
+ onSurfaceVariant: onSurfaceVariant ?? Color(MaterialDynamicColors.onSurfaceVariant.getArgb(scheme)),
+ inverseSurface: inverseSurface ?? Color(MaterialDynamicColors.inverseSurface.getArgb(scheme)),
+ onInverseSurface: onInverseSurface ?? Color(MaterialDynamicColors.inverseOnSurface.getArgb(scheme)),
+ inversePrimary: inversePrimary ?? Color(MaterialDynamicColors.inversePrimary.getArgb(scheme)),
+ shadow: shadow ?? Color(MaterialDynamicColors.shadow.getArgb(scheme)),
+ scrim: scrim ?? Color(MaterialDynamicColors.scrim.getArgb(scheme)),
+ surfaceTint: surfaceTint ?? Color(MaterialDynamicColors.primary.getArgb(scheme)),
brightness: brightness,
+ // DEPRECATED (newest deprecations at the bottom)
+ background: background ?? Color(MaterialDynamicColors.background.getArgb(scheme)),
+ onBackground: onBackground ?? Color(MaterialDynamicColors.onBackground.getArgb(scheme)),
+ surfaceVariant: surfaceVariant ?? Color(MaterialDynamicColors.surfaceVariant.getArgb(scheme)),
);
}
diff --git a/packages/flutter/lib/src/material/date_picker_theme.dart b/packages/flutter/lib/src/material/date_picker_theme.dart
index d2c7585..cd81c2e 100644
--- a/packages/flutter/lib/src/material/date_picker_theme.dart
+++ b/packages/flutter/lib/src/material/date_picker_theme.dart
@@ -227,6 +227,11 @@
/// to the [backgroundColor] of a full screen
/// [DateRangePickerDialog]'s to indicate elevation.
///
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
+ ///
/// See also:
/// [Material.surfaceTintColor], which explains how this color is related to
/// [elevation].
@@ -848,7 +853,7 @@
late final TextTheme _textTheme = _theme.textTheme;
@override
- Color? get backgroundColor => _colors.surface;
+ Color? get backgroundColor => _colors.surfaceContainerHigh;
@override
ButtonStyle get cancelButtonStyle {
@@ -864,7 +869,7 @@
Color? get shadowColor => Colors.transparent;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get headerBackgroundColor => Colors.transparent;
@@ -911,23 +916,23 @@
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onPrimary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
} else {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurfaceVariant.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
}
return null;
@@ -978,23 +983,23 @@
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onPrimary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
} else {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurfaceVariant.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
}
return null;
@@ -1013,13 +1018,13 @@
MaterialStateProperty<Color?>? get rangeSelectionOverlayColor =>
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onPrimaryContainer.withOpacity(0.12);
+ return _colors.onPrimaryContainer.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onPrimaryContainer.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onPrimaryContainer.withOpacity(0.12);
+ return _colors.onPrimaryContainer.withOpacity(0.1);
}
return null;
});
diff --git a/packages/flutter/lib/src/material/dialog.dart b/packages/flutter/lib/src/material/dialog.dart
index cb2af1e..3d8336f 100644
--- a/packages/flutter/lib/src/material/dialog.dart
+++ b/packages/flutter/lib/src/material/dialog.dart
@@ -85,7 +85,7 @@
///
/// This sets the [Material.color] on this [Dialog]'s [Material].
///
- /// If `null`, [ThemeData.dialogBackgroundColor] is used.
+ /// If `null`, [ColorScheme.surfaceContainerHigh] is used in Material 3.
/// {@endtemplate}
final Color? backgroundColor;
@@ -135,8 +135,12 @@
///
/// If [ThemeData.useMaterial3] is false property has no effect.
///
- /// If null and [ThemeData.useMaterial3] is true then [ThemeData]'s
- /// [ColorScheme.surfaceTint] will be used.
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
+ ///
+ /// defaults to [Colors.transparent].
///
/// To disable this feature, set [surfaceTintColor] to [Colors.transparent].
///
@@ -1648,13 +1652,13 @@
Color? get iconColor => _colors.secondary;
@override
- Color? get backgroundColor => _colors.surface;
+ Color? get backgroundColor => _colors.surfaceContainerHigh;
@override
Color? get shadowColor => Colors.transparent;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
TextStyle? get titleTextStyle => _textTheme.headlineSmall;
diff --git a/packages/flutter/lib/src/material/drawer.dart b/packages/flutter/lib/src/material/drawer.dart
index dc12c4b..e27eb14 100644
--- a/packages/flutter/lib/src/material/drawer.dart
+++ b/packages/flutter/lib/src/material/drawer.dart
@@ -175,13 +175,15 @@
/// The color used as a surface tint overlay on the drawer's background color,
/// which reflects the drawer's [elevation].
///
- /// If [ThemeData.useMaterial3] is false property has no effect.
- ///
- /// If null and [ThemeData.useMaterial3] is true then [ThemeData]'s
- /// [ColorScheme.surfaceTint] will be used.
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
///
/// To disable this feature, set [surfaceTintColor] to [Colors.transparent].
///
+ /// Defaults to [Colors.transparent].
+ ///
/// See also:
/// * [Material.surfaceTintColor], which describes how the surface tint will
/// be applied to the background color of the drawer.
@@ -791,10 +793,10 @@
late final TextDirection direction = Directionality.of(context);
@override
- Color? get backgroundColor => Theme.of(context).colorScheme.surface;
+ Color? get backgroundColor => Theme.of(context).colorScheme.surfaceContainerLow;
@override
- Color? get surfaceTintColor => Theme.of(context).colorScheme.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get shadowColor => Colors.transparent;
diff --git a/packages/flutter/lib/src/material/elevated_button.dart b/packages/flutter/lib/src/material/elevated_button.dart
index 3380abd..9a00c58 100644
--- a/packages/flutter/lib/src/material/elevated_button.dart
+++ b/packages/flutter/lib/src/material/elevated_button.dart
@@ -358,15 +358,15 @@
/// * `textStyle` - Theme.textTheme.labelLarge
/// * `backgroundColor`
/// * disabled - Theme.colorScheme.onSurface(0.12)
- /// * others - Theme.colorScheme.surface
+ /// * others - Theme.colorScheme.surfaceContainerLow
/// * `foregroundColor`
/// * disabled - Theme.colorScheme.onSurface(0.38)
/// * others - Theme.colorScheme.primary
/// * `overlayColor`
/// * hovered - Theme.colorScheme.primary(0.08)
- /// * focused or pressed - Theme.colorScheme.primary(0.12)
+ /// * focused or pressed - Theme.colorScheme.primary(0.1)
/// * `shadowColor` - Theme.colorScheme.shadow
- /// * `surfaceTintColor` - Theme.colorScheme.surfaceTint
+ /// * `surfaceTintColor` - Colors.transparent
/// * `elevation`
/// * disabled - 0
/// * default - 1
@@ -472,13 +472,13 @@
@override
Color? resolve(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return overlay.withOpacity(0.24);
+ return overlay.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return overlay.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return overlay.withOpacity(0.24);
+ return overlay.withOpacity(0.1);
}
return null;
}
@@ -629,7 +629,7 @@
if (states.contains(MaterialState.disabled)) {
return _colors.onSurface.withOpacity(0.12);
}
- return _colors.surface;
+ return _colors.surfaceContainerLow;
});
@override
@@ -645,13 +645,13 @@
MaterialStateProperty<Color?>? get overlayColor =>
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return null;
});
@@ -662,7 +662,7 @@
@override
MaterialStateProperty<Color>? get surfaceTintColor =>
- MaterialStatePropertyAll<Color>(_colors.surfaceTint);
+ const MaterialStatePropertyAll<Color>(Colors.transparent);
@override
MaterialStateProperty<double>? get elevation =>
diff --git a/packages/flutter/lib/src/material/filled_button.dart b/packages/flutter/lib/src/material/filled_button.dart
index 438aade..e84a492 100644
--- a/packages/flutter/lib/src/material/filled_button.dart
+++ b/packages/flutter/lib/src/material/filled_button.dart
@@ -417,7 +417,7 @@
/// * others - Theme.colorScheme.onSecondaryContainer
/// * `overlayColor`
/// * hovered - Theme.colorScheme.onSecondaryContainer(0.08)
- /// * focused or pressed - Theme.colorScheme.onSecondaryContainer(0.12)
+ /// * focused or pressed - Theme.colorScheme.onSecondaryContainer(0.1)
/// * `shadowColor` - Theme.colorScheme.shadow
/// * `surfaceTintColor` - Colors.transparent
/// * `elevation`
@@ -501,13 +501,13 @@
@override
Color? resolve(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return overlay.withOpacity(0.12);
+ return overlay.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return overlay.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return overlay.withOpacity(0.12);
+ return overlay.withOpacity(0.1);
}
return null;
}
@@ -676,13 +676,13 @@
MaterialStateProperty<Color?>? get overlayColor =>
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onPrimary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
return null;
});
@@ -798,13 +798,13 @@
MaterialStateProperty<Color?>? get overlayColor =>
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSecondaryContainer.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
return null;
});
diff --git a/packages/flutter/lib/src/material/filter_chip.dart b/packages/flutter/lib/src/material/filter_chip.dart
index 4cc1403..bede721 100644
--- a/packages/flutter/lib/src/material/filter_chip.dart
+++ b/packages/flutter/lib/src/material/filter_chip.dart
@@ -338,7 +338,7 @@
}
return _chipVariant == _ChipVariant.flat
? null
- : null;
+ : _colors.surfaceContainerLow;
});
@override
@@ -347,7 +347,7 @@
: _colors.shadow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get checkmarkColor => isEnabled
diff --git a/packages/flutter/lib/src/material/floating_action_button.dart b/packages/flutter/lib/src/material/floating_action_button.dart
index 1b32b6a..06aed53 100644
--- a/packages/flutter/lib/src/material/floating_action_button.dart
+++ b/packages/flutter/lib/src/material/floating_action_button.dart
@@ -283,19 +283,22 @@
/// The color to use for filling the button when the button has input focus.
///
- /// Defaults to [ThemeData.focusColor] for the current theme.
+ /// In Material3, defaults to [ColorScheme.onPrimaryContainer] with opacity 0.1.
+ /// In Material 2, it defaults to [ThemeData.focusColor] for the current theme.
final Color? focusColor;
/// The color to use for filling the button when the button has a pointer
/// hovering over it.
///
- /// Defaults to [ThemeData.hoverColor] for the current theme.
+ /// Defaults to [ThemeData.hoverColor] for the current theme in Material 2. In
+ /// Material 3, defaults to [ColorScheme.onPrimaryContainer] with opacity 0.08.
final Color? hoverColor;
/// The splash color for this [FloatingActionButton]'s [InkWell].
///
/// If null, [FloatingActionButtonThemeData.splashColor] is used, if that is
- /// null, [ThemeData.splashColor] is used.
+ /// null, [ThemeData.splashColor] is used in Material 2; [ColorScheme.onPrimaryContainer]
+ /// with opacity 0.1 is used in Material 3.
final Color? splashColor;
/// The tag to apply to the button's [Hero] widget.
@@ -808,8 +811,8 @@
@override Color? get foregroundColor => _colors.onPrimaryContainer;
@override Color? get backgroundColor => _colors.primaryContainer;
- @override Color? get splashColor => _colors.onPrimaryContainer.withOpacity(0.12);
- @override Color? get focusColor => _colors.onPrimaryContainer.withOpacity(0.12);
+ @override Color? get splashColor => _colors.onPrimaryContainer.withOpacity(0.1);
+ @override Color? get focusColor => _colors.onPrimaryContainer.withOpacity(0.1);
@override Color? get hoverColor => _colors.onPrimaryContainer.withOpacity(0.08);
@override
diff --git a/packages/flutter/lib/src/material/icon_button.dart b/packages/flutter/lib/src/material/icon_button.dart
index 8b0a9e0..bee7558 100644
--- a/packages/flutter/lib/src/material/icon_button.dart
+++ b/packages/flutter/lib/src/material/icon_button.dart
@@ -919,9 +919,9 @@
/// * `overlayColor`
/// * selected
/// * hovered - Theme.colorScheme.primary(0.08)
- /// * focused or pressed - Theme.colorScheme.primary(0.12)
- /// * hovered or focused - Theme.colorScheme.onSurfaceVariant(0.08)
- /// * pressed - Theme.colorScheme.onSurfaceVariant(0.12)
+ /// * focused or pressed - Theme.colorScheme.primary(0.1)
+ /// * hovered - Theme.colorScheme.onSurfaceVariant(0.08)
+ /// * pressed or focused - Theme.colorScheme.onSurfaceVariant(0.1)
/// * others - null
/// * `shadowColor` - null
/// * `surfaceTintColor` - null
@@ -1034,23 +1034,23 @@
Color? resolve(Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return highlightColor ?? foregroundColor?.withOpacity(0.12);
+ return highlightColor ?? foregroundColor?.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return hoverColor ?? foregroundColor?.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return focusColor ?? foregroundColor?.withOpacity(0.12);
+ return focusColor ?? foregroundColor?.withOpacity(0.1);
}
}
if (states.contains(MaterialState.pressed)) {
- return highlightColor ?? foregroundColor?.withOpacity(0.12);
+ return highlightColor ?? foregroundColor?.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return hoverColor ?? foregroundColor?.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return focusColor ?? foregroundColor?.withOpacity(0.08);
+ return focusColor ?? foregroundColor?.withOpacity(0.1);
}
return null;
}
@@ -1119,23 +1119,23 @@
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
}
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurfaceVariant.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
return Colors.transparent;
});
@@ -1229,7 +1229,7 @@
return _colors.primary;
}
if (toggleable) { // toggleable but unselected case
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
return _colors.primary;
});
@@ -1254,34 +1254,34 @@
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onPrimary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
}
if (toggleable) { // toggleable but unselected case
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
}
if (states.contains(MaterialState.pressed)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onPrimary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onPrimary.withOpacity(0.12);
+ return _colors.onPrimary.withOpacity(0.1);
}
return Colors.transparent;
});
@@ -1375,7 +1375,7 @@
return _colors.secondaryContainer;
}
if (toggleable) { // toggleable but unselected case
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
return _colors.secondaryContainer;
});
@@ -1400,34 +1400,34 @@
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSecondaryContainer.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
}
if (toggleable) { // toggleable but unselected case
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurfaceVariant.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurfaceVariant.withOpacity(0.12);
+ return _colors.onSurfaceVariant.withOpacity(0.1);
}
}
if (states.contains(MaterialState.pressed)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSecondaryContainer.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
return Colors.transparent;
});
@@ -1542,7 +1542,7 @@
MaterialStateProperty<Color?>? get overlayColor => MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onInverseSurface.withOpacity(0.12);
+ return _colors.onInverseSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onInverseSurface.withOpacity(0.08);
@@ -1552,7 +1552,7 @@
}
}
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurfaceVariant.withOpacity(0.08);
diff --git a/packages/flutter/lib/src/material/input_decorator.dart b/packages/flutter/lib/src/material/input_decorator.dart
index f9d72f0..136826b 100644
--- a/packages/flutter/lib/src/material/input_decorator.dart
+++ b/packages/flutter/lib/src/material/input_decorator.dart
@@ -4656,7 +4656,7 @@
if (states.contains(MaterialState.disabled)) {
return _colors.onSurface.withOpacity(0.04);
}
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
});
@override
diff --git a/packages/flutter/lib/src/material/menu_anchor.dart b/packages/flutter/lib/src/material/menu_anchor.dart
index 16f0846..ab05d34 100644
--- a/packages/flutter/lib/src/material/menu_anchor.dart
+++ b/packages/flutter/lib/src/material/menu_anchor.dart
@@ -3703,7 +3703,7 @@
@override
MaterialStateProperty<Color?> get backgroundColor {
- return MaterialStatePropertyAll<Color?>(_colors.surface);
+ return MaterialStatePropertyAll<Color?>(_colors.surfaceContainer);
}
@override
@@ -3713,7 +3713,7 @@
@override
MaterialStateProperty<Color?>? get surfaceTintColor {
- return MaterialStatePropertyAll<Color?>(_colors.surfaceTint);
+ return const MaterialStatePropertyAll<Color?>(Colors.transparent);
}
@override
@@ -3823,13 +3823,13 @@
return MaterialStateProperty.resolveWith(
(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
return Colors.transparent;
},
@@ -3912,12 +3912,12 @@
@override
MaterialStateProperty<Color?> get backgroundColor {
- return MaterialStatePropertyAll<Color?>(_colors.surface);
+ return MaterialStatePropertyAll<Color?>(_colors.surfaceContainer);
}
@override
MaterialStateProperty<Color?>? get surfaceTintColor {
- return MaterialStatePropertyAll<Color?>(_colors.surfaceTint);
+ return const MaterialStatePropertyAll<Color?>(Colors.transparent);
}
@override
diff --git a/packages/flutter/lib/src/material/navigation_bar.dart b/packages/flutter/lib/src/material/navigation_bar.dart
index 6bad234..a17697e 100644
--- a/packages/flutter/lib/src/material/navigation_bar.dart
+++ b/packages/flutter/lib/src/material/navigation_bar.dart
@@ -140,7 +140,7 @@
///
/// If null, [NavigationBarThemeData.backgroundColor] is used. If that
/// is also null, then if [ThemeData.useMaterial3] is true, the value is
- /// [ColorScheme.surface]. If that is false, the default blends [ColorScheme.surface]
+ /// [ColorScheme.surfaceContainer]. If that is false, the default blends [ColorScheme.surface]
/// and [ColorScheme.onSurface] using an [ElevationOverlay].
final Color? backgroundColor;
@@ -162,8 +162,13 @@
/// The color used as an overlay on [backgroundColor] to indicate elevation.
///
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
+ ///
/// If null, [NavigationBarThemeData.surfaceTintColor] is used. If that
- /// is also null, the default value is [ColorScheme.surfaceTint].
+ /// is also null, the default value is [Colors.transparent].
///
/// See [Material.surfaceTintColor] for more details on how this
/// overlay is applied.
@@ -1363,11 +1368,11 @@
late final ColorScheme _colors = Theme.of(context).colorScheme;
late final TextTheme _textTheme = Theme.of(context).textTheme;
- @override Color? get backgroundColor => _colors.surface;
+ @override Color? get backgroundColor => _colors.surfaceContainer;
@override Color? get shadowColor => Colors.transparent;
- @override Color? get surfaceTintColor => _colors.surfaceTint;
+ @override Color? get surfaceTintColor => Colors.transparent;
@override MaterialStateProperty<IconThemeData?>? get iconTheme {
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
diff --git a/packages/flutter/lib/src/material/navigation_drawer.dart b/packages/flutter/lib/src/material/navigation_drawer.dart
index 8ce07e9..edd9946 100644
--- a/packages/flutter/lib/src/material/navigation_drawer.dart
+++ b/packages/flutter/lib/src/material/navigation_drawer.dart
@@ -68,7 +68,7 @@
/// contents.
///
/// If this is null, then [NavigationDrawerThemeData.backgroundColor] is used.
- /// If that is also null, then it falls back to [ColorScheme.surface].
+ /// If that is also null, then it falls back to [ColorScheme.surfaceContainerLow].
final Color? backgroundColor;
/// The color used for the drop shadow to indicate elevation.
@@ -80,11 +80,16 @@
/// See [Material.shadowColor] for more details on drop shadows.
final Color? shadowColor;
- /// The surface tint of the [Material] that holds the [NavigationDrawer]'s
+ /// The surface tint of the [Material] that holds the [NavigationDrawer]'s
/// contents.
///
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
+ ///
/// If this is null, then [NavigationDrawerThemeData.surfaceTintColor] is used.
- /// If that is also null, then it falls back to [Material.surfaceTintColor]'s default.
+ /// If that is also null, the default value is [Colors.transparent].
final Color? surfaceTintColor;
/// The elevation of the [NavigationDrawer] itself.
@@ -711,10 +716,10 @@
late final TextTheme _textTheme = Theme.of(context).textTheme;
@override
- Color? get backgroundColor => _colors.surface;
+ Color? get backgroundColor => _colors.surfaceContainerLow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
Color? get shadowColor => Colors.transparent;
diff --git a/packages/flutter/lib/src/material/outlined_button.dart b/packages/flutter/lib/src/material/outlined_button.dart
index 3ca3b7c..35be334 100644
--- a/packages/flutter/lib/src/material/outlined_button.dart
+++ b/packages/flutter/lib/src/material/outlined_button.dart
@@ -317,7 +317,7 @@
/// * others - Theme.colorScheme.primary
/// * `overlayColor`
/// * hovered - Theme.colorScheme.primary(0.08)
- /// * focused or pressed - Theme.colorScheme.primary(0.12)
+ /// * focused or pressed - Theme.colorScheme.primary(0.1)
/// * others - null
/// * `shadowColor` - Colors.transparent,
/// * `surfaceTintColor` - null
@@ -421,13 +421,13 @@
@override
Color? resolve(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return foreground.withOpacity(0.12);
+ return foreground.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
- return foreground.withOpacity(0.04);
+ return foreground.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return foreground.withOpacity(0.12);
+ return foreground.withOpacity(0.1);
}
return null;
}
@@ -559,13 +559,13 @@
MaterialStateProperty<Color?>? get overlayColor =>
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return null;
});
diff --git a/packages/flutter/lib/src/material/popup_menu.dart b/packages/flutter/lib/src/material/popup_menu.dart
index fdddc10..8746b34 100644
--- a/packages/flutter/lib/src/material/popup_menu.dart
+++ b/packages/flutter/lib/src/material/popup_menu.dart
@@ -8,6 +8,7 @@
import 'package:flutter/widgets.dart';
import 'color_scheme.dart';
+import 'colors.dart';
import 'constants.dart';
import 'debug.dart';
import 'divider.dart';
@@ -1194,8 +1195,13 @@
/// The color used as an overlay on [color] to indicate elevation.
///
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
+ ///
/// If null, [PopupMenuThemeData.surfaceTintColor] is used. If that
- /// is also null, the default value is [ColorScheme.surfaceTint].
+ /// is also null, the default value is [Colors.transparent].
///
/// See [Material.surfaceTintColor] for more details on how this
/// overlay is applied.
@@ -1251,7 +1257,8 @@
///
/// If this property is null, then [PopupMenuThemeData.color] is used.
/// If [PopupMenuThemeData.color] is also null, then
- /// Theme.of(context).cardColor is used.
+ /// [ThemeData.cardColor] is used in Material 2. In Material3, defaults to
+ /// [ColorScheme.surfaceContainer].
final Color? color;
/// If provided, this color is used for the button icon.
@@ -1513,13 +1520,13 @@
}
@override
- Color? get color => _colors.surface;
+ Color? get color => _colors.surfaceContainer;
@override
Color? get shadowColor => _colors.shadow;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
@override
ShapeBorder? get shape => const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0)));
diff --git a/packages/flutter/lib/src/material/progress_indicator.dart b/packages/flutter/lib/src/material/progress_indicator.dart
index ed53025..8b4cf3f 100644
--- a/packages/flutter/lib/src/material/progress_indicator.dart
+++ b/packages/flutter/lib/src/material/progress_indicator.dart
@@ -1086,7 +1086,7 @@
Color get color => _colors.primary;
@override
- Color get linearTrackColor => _colors.surfaceVariant;
+ Color get linearTrackColor => _colors.surfaceContainerHighest;
@override
double get linearMinHeight => 4.0;
diff --git a/packages/flutter/lib/src/material/radio.dart b/packages/flutter/lib/src/material/radio.dart
index f41dda5..d0c97e3 100644
--- a/packages/flutter/lib/src/material/radio.dart
+++ b/packages/flutter/lib/src/material/radio.dart
@@ -330,9 +330,17 @@
/// [kRadialReactionAlpha], [focusColor] and [hoverColor] is used in the
/// pressed, focused and hovered state. If that is also null,
/// the value of [RadioThemeData.overlayColor] is used. If that is also null,
- /// then the value of [ColorScheme.secondary] with alpha
+ /// then in Material 2, the value of [ColorScheme.secondary] with alpha
/// [kRadialReactionAlpha], [ThemeData.focusColor] and [ThemeData.hoverColor]
- /// is used in the pressed, focused and hovered state.
+ /// is used in the pressed, focused and hovered state. In Material3, the default
+ /// values are:
+ /// * selected
+ /// * pressed - Theme.colorScheme.onSurface(0.1)
+ /// * hovered - Theme.colorScheme.primary(0.08)
+ /// * focused - Theme.colorScheme.primary(0.1)
+ /// * pressed - Theme.colorScheme.primary(0.1)
+ /// * hovered - Theme.colorScheme.onSurface(0.08)
+ /// * focused - Theme.colorScheme.onSurface(0.1)
final MaterialStateProperty<Color?>? overlayColor;
/// {@template flutter.material.radio.splashRadius}
@@ -672,24 +680,24 @@
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return Colors.transparent;
}
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
return Colors.transparent;
});
diff --git a/packages/flutter/lib/src/material/search_anchor.dart b/packages/flutter/lib/src/material/search_anchor.dart
index 88d8d51..7018469 100644
--- a/packages/flutter/lib/src/material/search_anchor.dart
+++ b/packages/flutter/lib/src/material/search_anchor.dart
@@ -228,7 +228,7 @@
/// The search view's background fill color.
///
/// If null, the value of [SearchViewThemeData.backgroundColor] will be used.
- /// If this is also null, then the default value is [ColorScheme.surface].
+ /// If this is also null, then the default value is [ColorScheme.surfaceContainerHigh].
final Color? viewBackgroundColor;
/// The elevation of the search view's [Material].
@@ -239,7 +239,10 @@
/// The surface tint color of the search view's [Material].
///
- /// See [Material.surfaceTintColor] for more details.
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
///
/// If null, the value of [SearchViewThemeData.surfaceTintColor] will be used.
/// If this is also null, then the default value is [ColorScheme.surfaceTint].
@@ -1192,7 +1195,7 @@
/// The search bar's background fill color.
///
/// If null, the value of [SearchBarThemeData.backgroundColor] will be used.
- /// If this is also null, then the default value is [ColorScheme.surface].
+ /// If this is also null, then the default value is [ColorScheme.surfaceContainerHigh].
final MaterialStateProperty<Color?>? backgroundColor;
/// The shadow color of the search bar's [Material].
@@ -1203,10 +1206,13 @@
/// The surface tint color of the search bar's [Material].
///
- /// See [Material.surfaceTintColor] for more details.
+ /// This is not recommended for use. [Material 3 spec](https://m3.material.io/styles/color/the-color-system/color-roles)
+ /// introduced a set of tone-based surfaces and surface containers in its [ColorScheme],
+ /// which provide more flexibility. The intention is to eventually remove surface tint color from
+ /// the framework.
///
/// If null, the value of [SearchBarThemeData.surfaceTintColor] will be used.
- /// If this is also null, then the default value is [ColorScheme.surfaceTint].
+ /// If this is also null, then the default value is [Colors.transparent].
final MaterialStateProperty<Color?>? surfaceTintColor;
/// The highlight color that's typically used to indicate that
@@ -1445,7 +1451,7 @@
@override
MaterialStateProperty<Color?>? get backgroundColor =>
- MaterialStatePropertyAll<Color>(_colors.surface);
+ MaterialStatePropertyAll<Color>(_colors.surfaceContainerHigh);
@override
MaterialStateProperty<double>? get elevation =>
@@ -1457,13 +1463,13 @@
@override
MaterialStateProperty<Color>? get surfaceTintColor =>
- MaterialStatePropertyAll<Color>(_colors.surfaceTint);
+ const MaterialStatePropertyAll<Color>(Colors.transparent);
@override
MaterialStateProperty<Color?>? get overlayColor =>
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
@@ -1520,13 +1526,13 @@
static double fullScreenBarHeight = 72.0;
@override
- Color? get backgroundColor => _colors.surface;
+ Color? get backgroundColor => _colors.surfaceContainerHigh;
@override
double? get elevation => 6.0;
@override
- Color? get surfaceTintColor => _colors.surfaceTint;
+ Color? get surfaceTintColor => Colors.transparent;
// No default side
diff --git a/packages/flutter/lib/src/material/segmented_button.dart b/packages/flutter/lib/src/material/segmented_button.dart
index b2dd0e1..540513e 100644
--- a/packages/flutter/lib/src/material/segmented_button.dart
+++ b/packages/flutter/lib/src/material/segmented_button.dart
@@ -985,23 +985,23 @@
overlayColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSecondaryContainer.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSecondaryContainer.withOpacity(0.12);
+ return _colors.onSecondaryContainer.withOpacity(0.1);
}
} else {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
}
return null;
@@ -1026,23 +1026,23 @@
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return selectedColor?.withOpacity(0.12);
+ return selectedColor?.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return selectedColor?.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return selectedColor?.withOpacity(0.12);
+ return selectedColor?.withOpacity(0.1);
}
} else {
if (states.contains(MaterialState.pressed)) {
- return unselectedColor?.withOpacity(0.12);
+ return unselectedColor?.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return unselectedColor?.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return unselectedColor?.withOpacity(0.12);
+ return unselectedColor?.withOpacity(0.1);
}
}
return Colors.transparent;
diff --git a/packages/flutter/lib/src/material/slider.dart b/packages/flutter/lib/src/material/slider.dart
index c60042e..0719926 100644
--- a/packages/flutter/lib/src/material/slider.dart
+++ b/packages/flutter/lib/src/material/slider.dart
@@ -424,7 +424,7 @@
///
/// If null, [SliderThemeData.inactiveTrackColor] of the ambient [SliderTheme]
/// is used. If that is null and [ThemeData.useMaterial3] is true,
- /// [ColorScheme.surfaceVariant] will be used, otherwise [ColorScheme.primary]
+ /// [ColorScheme.surfaceContainerHighest] will be used, otherwise [ColorScheme.primary]
/// with an opacity of 0.24 will be used.
///
/// Using a [SliderTheme] gives much more fine-grained control over the
@@ -468,7 +468,7 @@
///
/// If that is also null, If [ThemeData.useMaterial3] is true,
/// Slider will use [ColorScheme.primary] with an opacity of 0.08 when
- /// slider thumb is hovered and with an opacity of 0.12 when slider thumb
+ /// slider thumb is hovered and with an opacity of 0.1 when slider thumb
/// is focused or dragged, If [ThemeData.useMaterial3] is false, defaults
/// to [ColorScheme.primary] with an opacity of 0.12.
final MaterialStateProperty<Color?>? overlayColor;
@@ -1974,7 +1974,7 @@
Color? get activeTrackColor => _colors.primary;
@override
- Color? get inactiveTrackColor => _colors.surfaceVariant;
+ Color? get inactiveTrackColor => _colors.surfaceContainerHighest;
@override
Color? get secondaryActiveTrackColor => _colors.primary.withOpacity(0.54);
@@ -2009,13 +2009,13 @@
@override
Color? get overlayColor => MaterialStateColor.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.dragged)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return Colors.transparent;
diff --git a/packages/flutter/lib/src/material/snack_bar.dart b/packages/flutter/lib/src/material/snack_bar.dart
index dd9f6f8..78e1b2e 100644
--- a/packages/flutter/lib/src/material/snack_bar.dart
+++ b/packages/flutter/lib/src/material/snack_bar.dart
@@ -586,7 +586,7 @@
primary: colorScheme.onPrimary,
secondary: buttonColor,
surface: colorScheme.onSurface,
- background: defaults.backgroundColor!,
+ background: defaults.backgroundColor,
error: colorScheme.onError,
onPrimary: colorScheme.primary,
onSecondary: colorScheme.secondary,
diff --git a/packages/flutter/lib/src/material/switch.dart b/packages/flutter/lib/src/material/switch.dart
index 4bab570..35a3dae 100644
--- a/packages/flutter/lib/src/material/switch.dart
+++ b/packages/flutter/lib/src/material/switch.dart
@@ -2069,7 +2069,7 @@
if (states.contains(MaterialState.selected)) {
return _colors.onSurface.withOpacity(0.12);
}
- return _colors.surfaceVariant.withOpacity(0.12);
+ return _colors.surfaceContainerHighest.withOpacity(0.12);
}
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
@@ -2084,15 +2084,15 @@
return _colors.primary;
}
if (states.contains(MaterialState.pressed)) {
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
if (states.contains(MaterialState.hovered)) {
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
if (states.contains(MaterialState.focused)) {
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
});
}
@@ -2114,24 +2114,24 @@
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return null;
}
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
return null;
});
@@ -2169,7 +2169,7 @@
if (states.contains(MaterialState.selected)) {
return _colors.onSurface.withOpacity(0.38);
}
- return _colors.surfaceVariant.withOpacity(0.38);
+ return _colors.surfaceContainerHighest.withOpacity(0.38);
}
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
@@ -2184,15 +2184,15 @@
return _colors.onPrimaryContainer;
}
if (states.contains(MaterialState.pressed)) {
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
if (states.contains(MaterialState.hovered)) {
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
if (states.contains(MaterialState.focused)) {
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
});
}
diff --git a/packages/flutter/lib/src/material/tabs.dart b/packages/flutter/lib/src/material/tabs.dart
index 22edc9d..dd37970 100644
--- a/packages/flutter/lib/src/material/tabs.dart
+++ b/packages/flutter/lib/src/material/tabs.dart
@@ -1020,9 +1020,9 @@
/// The color of the divider.
///
- /// If null and [ThemeData.useMaterial3] is true, [TabBarTheme.dividerColor]
+ /// If null and [ThemeData.useMaterial3] is false, [TabBarTheme.dividerColor]
/// color is used. If that is null and [ThemeData.useMaterial3] is true,
- /// [ColorScheme.surfaceVariant] will be used, otherwise divider will not be drawn.
+ /// [ColorScheme.outlineVariant] will be used, otherwise divider will not be drawn.
final Color? dividerColor;
/// The height of the divider.
@@ -1121,9 +1121,17 @@
/// [MaterialState.pressed] triggers a ripple (an ink splash), per
/// the current Material Design spec.
///
- /// If the overlay color is null or resolves to null, then the default values
- /// for [InkResponse.focusColor], [InkResponse.hoverColor], [InkResponse.splashColor],
- /// and [InkResponse.highlightColor] will be used instead.
+ /// If the overlay color is null or resolves to null, then if [ThemeData.useMaterial3] is
+ /// false, the default values for [InkResponse.focusColor], [InkResponse.hoverColor], [InkResponse.splashColor],
+ /// and [InkResponse.highlightColor] will be used instead. If [ThemeData.useMaterial3]
+ /// if true, the default values are:
+ /// * selected:
+ /// * pressed - ThemeData.colorScheme.primary(0.1)
+ /// * hovered - ThemeData.colorScheme.primary(0.08)
+ /// * focused - ThemeData.colorScheme.primary(0.1)
+ /// * pressed - ThemeData.colorScheme.primary(0.1)
+ /// * hovered - ThemeData.colorScheme.onSurface(0.08)
+ /// * focused - ThemeData.colorScheme.onSurface(0.1)
final MaterialStateProperty<Color?>? overlayColor;
/// {@macro flutter.widgets.scrollable.dragStartBehavior}
@@ -2359,9 +2367,11 @@
late final TextTheme _textTheme = Theme.of(context).textTheme;
final bool isScrollable;
+ // This value comes from Divider widget defaults. Token db deprecated 'primary-navigation-tab.divider.color' token.
@override
- Color? get dividerColor => _colors.surfaceVariant;
+ Color? get dividerColor => _colors.outlineVariant;
+ // This value comes from Divider widget defaults. Token db deprecated 'primary-navigation-tab.divider.height' token.
@override
double? get dividerHeight => 1.0;
@@ -2385,24 +2395,24 @@
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return null;
}
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
return null;
});
@@ -2431,9 +2441,11 @@
late final TextTheme _textTheme = Theme.of(context).textTheme;
final bool isScrollable;
+ // This value comes from Divider widget defaults. Token db deprecated 'secondary-navigation-tab.divider.color' token.
@override
- Color? get dividerColor => _colors.surfaceVariant;
+ Color? get dividerColor => _colors.outlineVariant;
+ // This value comes from Divider widget defaults. Token db deprecated 'secondary-navigation-tab.divider.height' token.
@override
double? get dividerHeight => 1.0;
@@ -2457,24 +2469,24 @@
return MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
return null;
}
if (states.contains(MaterialState.pressed)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.onSurface.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.onSurface.withOpacity(0.12);
+ return _colors.onSurface.withOpacity(0.1);
}
return null;
});
diff --git a/packages/flutter/lib/src/material/text_button.dart b/packages/flutter/lib/src/material/text_button.dart
index 669217a..078b44d 100644
--- a/packages/flutter/lib/src/material/text_button.dart
+++ b/packages/flutter/lib/src/material/text_button.dart
@@ -350,7 +350,7 @@
/// * others - Theme.colorScheme.primary
/// * `overlayColor`
/// * hovered - Theme.colorScheme.primary(0.08)
- /// * focused or pressed - Theme.colorScheme.primary(0.12)
+ /// * focused or pressed - Theme.colorScheme.primary(0.1)
/// * others - null
/// * `shadowColor` - Colors.transparent,
/// * `surfaceTintColor` - null
@@ -458,13 +458,13 @@
@override
Color? resolve(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return primary.withOpacity(0.12);
+ return primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
- return primary.withOpacity(0.04);
+ return primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return primary.withOpacity(0.12);
+ return primary.withOpacity(0.1);
}
return null;
}
@@ -600,13 +600,13 @@
MaterialStateProperty<Color?>? get overlayColor =>
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
if (states.contains(MaterialState.hovered)) {
return _colors.primary.withOpacity(0.08);
}
if (states.contains(MaterialState.focused)) {
- return _colors.primary.withOpacity(0.12);
+ return _colors.primary.withOpacity(0.1);
}
return null;
});
diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart
index 967f1e5..096a08d 100644
--- a/packages/flutter/lib/src/material/theme_data.dart
+++ b/packages/flutter/lib/src/material/theme_data.dart
@@ -2621,30 +2621,49 @@
onPrimary: Color(0xFFFFFFFF),
primaryContainer: Color(0xFFEADDFF),
onPrimaryContainer: Color(0xFF21005D),
+ primaryFixed: Color(0xFFEADDFF),
+ primaryFixedDim: Color(0xFFD0BCFF),
+ onPrimaryFixed: Color(0xFF21005D),
+ onPrimaryFixedVariant: Color(0xFF4F378B),
secondary: Color(0xFF625B71),
onSecondary: Color(0xFFFFFFFF),
secondaryContainer: Color(0xFFE8DEF8),
onSecondaryContainer: Color(0xFF1D192B),
+ secondaryFixed: Color(0xFFE8DEF8),
+ secondaryFixedDim: Color(0xFFCCC2DC),
+ onSecondaryFixed: Color(0xFF1D192B),
+ onSecondaryFixedVariant: Color(0xFF4A4458),
tertiary: Color(0xFF7D5260),
onTertiary: Color(0xFFFFFFFF),
tertiaryContainer: Color(0xFFFFD8E4),
onTertiaryContainer: Color(0xFF31111D),
+ tertiaryFixed: Color(0xFFFFD8E4),
+ tertiaryFixedDim: Color(0xFFEFB8C8),
+ onTertiaryFixed: Color(0xFF31111D),
+ onTertiaryFixedVariant: Color(0xFF633B48),
error: Color(0xFFB3261E),
onError: Color(0xFFFFFFFF),
errorContainer: Color(0xFFF9DEDC),
onErrorContainer: Color(0xFF410E0B),
- background: Color(0xFFFFFBFE),
- onBackground: Color(0xFF1C1B1F),
- surface: Color(0xFFFFFBFE),
- onSurface: Color(0xFF1C1B1F),
+ background: Color(0xFFFEF7FF),
+ onBackground: Color(0xFF1D1B20),
+ surface: Color(0xFFFEF7FF),
+ surfaceBright: Color(0xFFFEF7FF),
+ surfaceContainerLowest: Color(0xFFFFFFFF),
+ surfaceContainerLow: Color(0xFFF7F2FA),
+ surfaceContainer: Color(0xFFF3EDF7),
+ surfaceContainerHigh: Color(0xFFECE6F0),
+ surfaceContainerHighest: Color(0xFFE6E0E9),
+ surfaceDim: Color(0xFFDED8E1),
+ onSurface: Color(0xFF1D1B20),
surfaceVariant: Color(0xFFE7E0EC),
onSurfaceVariant: Color(0xFF49454F),
outline: Color(0xFF79747E),
outlineVariant: Color(0xFFCAC4D0),
shadow: Color(0xFF000000),
scrim: Color(0xFF000000),
- inverseSurface: Color(0xFF313033),
- onInverseSurface: Color(0xFFF4EFF4),
+ inverseSurface: Color(0xFF322F35),
+ onInverseSurface: Color(0xFFF5EFF7),
inversePrimary: Color(0xFFD0BCFF),
// The surfaceTint color is set to the same color as the primary.
surfaceTint: Color(0xFF6750A4),
@@ -2656,30 +2675,49 @@
onPrimary: Color(0xFF381E72),
primaryContainer: Color(0xFF4F378B),
onPrimaryContainer: Color(0xFFEADDFF),
+ primaryFixed: Color(0xFFEADDFF),
+ primaryFixedDim: Color(0xFFD0BCFF),
+ onPrimaryFixed: Color(0xFF21005D),
+ onPrimaryFixedVariant: Color(0xFF4F378B),
secondary: Color(0xFFCCC2DC),
onSecondary: Color(0xFF332D41),
secondaryContainer: Color(0xFF4A4458),
onSecondaryContainer: Color(0xFFE8DEF8),
+ secondaryFixed: Color(0xFFE8DEF8),
+ secondaryFixedDim: Color(0xFFCCC2DC),
+ onSecondaryFixed: Color(0xFF1D192B),
+ onSecondaryFixedVariant: Color(0xFF4A4458),
tertiary: Color(0xFFEFB8C8),
onTertiary: Color(0xFF492532),
tertiaryContainer: Color(0xFF633B48),
onTertiaryContainer: Color(0xFFFFD8E4),
+ tertiaryFixed: Color(0xFFFFD8E4),
+ tertiaryFixedDim: Color(0xFFEFB8C8),
+ onTertiaryFixed: Color(0xFF31111D),
+ onTertiaryFixedVariant: Color(0xFF633B48),
error: Color(0xFFF2B8B5),
onError: Color(0xFF601410),
errorContainer: Color(0xFF8C1D18),
onErrorContainer: Color(0xFFF9DEDC),
- background: Color(0xFF1C1B1F),
- onBackground: Color(0xFFE6E1E5),
- surface: Color(0xFF1C1B1F),
- onSurface: Color(0xFFE6E1E5),
+ background: Color(0xFF141218),
+ onBackground: Color(0xFFE6E0E9),
+ surface: Color(0xFF141218),
+ surfaceBright: Color(0xFF3B383E),
+ surfaceContainerLowest: Color(0xFF0F0D13),
+ surfaceContainerLow: Color(0xFF1D1B20),
+ surfaceContainer: Color(0xFF211F26),
+ surfaceContainerHigh: Color(0xFF2B2930),
+ surfaceContainerHighest: Color(0xFF36343B),
+ surfaceDim: Color(0xFF141218),
+ onSurface: Color(0xFFE6E0E9),
surfaceVariant: Color(0xFF49454F),
onSurfaceVariant: Color(0xFFCAC4D0),
outline: Color(0xFF938F99),
outlineVariant: Color(0xFF49454F),
shadow: Color(0xFF000000),
scrim: Color(0xFF000000),
- inverseSurface: Color(0xFFE6E1E5),
- onInverseSurface: Color(0xFF313033),
+ inverseSurface: Color(0xFFE6E0E9),
+ onInverseSurface: Color(0xFF322F35),
inversePrimary: Color(0xFF6750A4),
// The surfaceTint color is set to the same color as the primary.
surfaceTint: Color(0xFFD0BCFF),
diff --git a/packages/flutter/lib/src/material/time_picker.dart b/packages/flutter/lib/src/material/time_picker.dart
index 731417b..1fe8d50 100644
--- a/packages/flutter/lib/src/material/time_picker.dart
+++ b/packages/flutter/lib/src/material/time_picker.dart
@@ -3357,7 +3357,7 @@
@override
Color get backgroundColor {
- return _colors.surface;
+ return _colors.surfaceContainerHigh;
}
@override
@@ -3445,7 +3445,7 @@
@override
Color get dialBackgroundColor {
- return _colors.surfaceVariant;
+ return _colors.surfaceContainerHighest;
}
@override
@@ -3522,22 +3522,22 @@
const double hoverOpacity = 0.08;
overlayColor = _colors.onPrimaryContainer.withOpacity(hoverOpacity);
} else if (states.contains(MaterialState.focused)) {
- const double focusOpacity = 0.12;
+ const double focusOpacity = 0.1;
overlayColor = _colors.onPrimaryContainer.withOpacity(focusOpacity);
}
return Color.alphaBlend(overlayColor, _colors.primaryContainer);
} else {
- Color overlayColor = _colors.surfaceVariant;
+ Color overlayColor = _colors.surfaceContainerHighest;
if (states.contains(MaterialState.pressed)) {
overlayColor = _colors.onSurface;
} else if (states.contains(MaterialState.hovered)) {
const double hoverOpacity = 0.08;
overlayColor = _colors.onSurface.withOpacity(hoverOpacity);
} else if (states.contains(MaterialState.focused)) {
- const double focusOpacity = 0.12;
+ const double focusOpacity = 0.1;
overlayColor = _colors.onSurface.withOpacity(focusOpacity);
}
- return Color.alphaBlend(overlayColor, _colors.surfaceVariant);
+ return Color.alphaBlend(overlayColor, _colors.surfaceContainerHighest);
}
});
}
diff --git a/packages/flutter/lib/src/material/time_picker_theme.dart b/packages/flutter/lib/src/material/time_picker_theme.dart
index 0c10413..1ba598a 100644
--- a/packages/flutter/lib/src/material/time_picker_theme.dart
+++ b/packages/flutter/lib/src/material/time_picker_theme.dart
@@ -69,7 +69,7 @@
/// The background color of a time picker.
///
/// If this is null, the time picker defaults to the overall theme's
- /// [ColorScheme.background].
+ /// [ColorScheme.surfaceContainerHigh].
final Color? backgroundColor;
/// The style of the cancel button of a [TimePickerDialog].
@@ -85,7 +85,7 @@
/// ```dart
/// BorderSide(
/// color: Color.alphaBlend(
- /// Theme.of(context).colorScheme.onBackground.withOpacity(0.38),
+ /// Theme.of(context).colorScheme.onSurface.withOpacity(0.38),
/// Theme.of(context).colorScheme.surface,
/// ),
/// ),
@@ -154,7 +154,7 @@
/// [TimePickerEntryMode.dial] or [TimePickerEntryMode.dialOnly].
///
/// If this is null and [ThemeData.useMaterial3] is true, the time picker
- /// dial background color defaults [ColorScheme.surfaceVariant] color.
+ /// dial background color defaults [ColorScheme.surfaceContainerHighest] color.
///
/// If this is null and [ThemeData.useMaterial3] is false, the time picker
/// dial background color defaults to [ColorScheme.onSurface] color with
diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart
index 2e5aee9..c4194e4 100644
--- a/packages/flutter/lib/src/widgets/routes.dart
+++ b/packages/flutter/lib/src/widgets/routes.dart
@@ -1368,7 +1368,7 @@
/// background color, one could say:
///
/// ```dart
- /// Color get barrierColor => Theme.of(navigator.context).colorScheme.background;
+ /// Color get barrierColor => Theme.of(navigator.context).colorScheme.surface;
/// ```
///
/// {@end-tool}
diff --git a/packages/flutter/test/material/action_chip_test.dart b/packages/flutter/test/material/action_chip_test.dart
index 9006b86..a350df4 100644
--- a/packages/flutter/test/material/action_chip_test.dart
+++ b/packages/flutter/test/material/action_chip_test.dart
@@ -161,7 +161,7 @@
Material chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, Colors.transparent);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
RoundedRectangleBorder(
@@ -189,7 +189,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, Colors.transparent);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
RoundedRectangleBorder(
@@ -235,7 +235,7 @@
Material chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 1);
expect(chipMaterial.shadowColor, theme.colorScheme.shadow);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -245,7 +245,7 @@
);
ShapeDecoration decoration = tester.widget<Ink>(find.byType(Ink)).decoration! as ShapeDecoration;
- expect(decoration.color, null);
+ expect(decoration.color, theme.colorScheme.surfaceContainerLow);
// Test disabled ActionChip.elevated defaults.
await tester.pumpWidget(
@@ -263,7 +263,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, theme.colorScheme.shadow);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
diff --git a/packages/flutter/test/material/app_test.dart b/packages/flutter/test/material/app_test.dart
index d72d990..6ac9981 100644
--- a/packages/flutter/test/material/app_test.dart
+++ b/packages/flutter/test/material/app_test.dart
@@ -1587,7 +1587,7 @@
// Test the initial Scaffold background color.
await tester.pumpWidget(buildWidget());
- expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xfffffbfe));
+ expect(tester.widget<Material>(find.byType(Material)).color, lightTheme.colorScheme.surface);
// Test the Scaffold background color animation from light to dark theme.
await tester.pumpWidget(buildWidget(themeMode: ThemeMode.dark));
@@ -1595,13 +1595,13 @@
await tester.pump(const Duration(milliseconds: 50)); // Advance animation by 50 milliseconds.
// Scaffold background color is slightly updated.
- expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xffc6c3c6));
+ expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xffc3bdc5));
// Let the animation finish.
await tester.pumpAndSettle();
// Scaffold background color is fully updated to dark theme.
- expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xff1c1b1f));
+ expect(tester.widget<Material>(find.byType(Material)).color, darkTheme.colorScheme.surface);
// Reset to light theme to compare the Scaffold background color animation
// with the default animation curve.
@@ -1618,21 +1618,21 @@
// Scaffold background color is slightly updated but with a different
// color than the default animation curve.
- expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xffe9e5e9));
+ expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xffe7e1e9));
// Let the animation finish.
await tester.pumpAndSettle();
// Scaffold background color is fully updated to dark theme.
- expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xff1c1b1f));
+ expect(tester.widget<Material>(find.byType(Material)).color, darkTheme.colorScheme.surface);
// Switch from dark to light theme with overridden animation duration.
await tester.pumpWidget(buildWidget(animationStyle: AnimationStyle.noAnimation));
await tester.pump();
await tester.pump(const Duration(milliseconds: 1));
- expect(tester.widget<Material>(find.byType(Material)).color, isNot(const Color(0xff1c1b1f)));
- expect(tester.widget<Material>(find.byType(Material)).color, const Color(0xfffffbfe));
+ expect(tester.widget<Material>(find.byType(Material)).color, isNot(darkTheme.colorScheme.surface));
+ expect(tester.widget<Material>(find.byType(Material)).color, lightTheme.colorScheme.surface);
});
testWidgets('AnimationStyle.noAnimation removes AnimatedTheme from the tree', (WidgetTester tester) async {
diff --git a/packages/flutter/test/material/banner_theme_test.dart b/packages/flutter/test/material/banner_theme_test.dart
index ca4c902..8a6d2e5 100644
--- a/packages/flutter/test/material/banner_theme_test.dart
+++ b/packages/flutter/test/material/banner_theme_test.dart
@@ -92,8 +92,8 @@
));
final Material material = _getMaterialFromText(tester, contentText);
- expect(material.color, theme.colorScheme.surface);
- expect(material.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(material.color, theme.colorScheme.surfaceContainerLow);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.shadowColor, null);
expect(material.elevation, 0.0);
@@ -155,8 +155,8 @@
await tester.pumpAndSettle();
final Material material = _getMaterialFromText(tester, contentText);
- expect(material.color, theme.colorScheme.surface);
- expect(material.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(material.color, theme.colorScheme.surfaceContainerLow);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.shadowColor, null);
expect(material.elevation, 0.0);
@@ -406,7 +406,7 @@
));
final Material material = _getMaterialFromText(tester, contentText);
- expect(material.color, colorScheme.surface);
+ expect(material.color, colorScheme.surfaceContainerLow);
});
testWidgets('MaterialBanner uses color scheme when necessary when presented by ScaffoldMessenger', (WidgetTester tester) async {
@@ -445,7 +445,7 @@
await tester.pumpAndSettle();
final Material material = _getMaterialFromText(tester, contentText);
- expect(material.color, colorScheme.surface);
+ expect(material.color, colorScheme.surfaceContainerLow);
});
group('Material 2', () {
diff --git a/packages/flutter/test/material/bottom_app_bar_test.dart b/packages/flutter/test/material/bottom_app_bar_test.dart
index cf267c6..85e2c4d 100644
--- a/packages/flutter/test/material/bottom_app_bar_test.dart
+++ b/packages/flutter/test/material/bottom_app_bar_test.dart
@@ -358,7 +358,7 @@
theme: ThemeData.from(useMaterial3: true, colorScheme: colorScheme),
home: Scaffold(
bottomNavigationBar: BottomAppBar(
- color: colorScheme.surface,
+ color: colorScheme.surfaceContainer,
),
),
),
@@ -367,8 +367,9 @@
final PhysicalShape physicalShape = tester.widget(find.byType(PhysicalShape).at(0));
const double elevation = 3.0; // Default for M3.
- final Color overlayColor = ElevationOverlay.applySurfaceTint(colorScheme.surface, colorScheme.surfaceTint, elevation);
- expect(physicalShape.color, overlayColor);
+ final Color overlayColor = ElevationOverlay.applySurfaceTint(colorScheme.surfaceContainer, colorScheme.surfaceTint, elevation);
+ expect(physicalShape.color, isNot(overlayColor));
+ expect(physicalShape.color, colorScheme.surfaceContainer);
});
// This is a regression test for a bug we had where toggling the notch on/off
diff --git a/packages/flutter/test/material/bottom_app_bar_theme_test.dart b/packages/flutter/test/material/bottom_app_bar_theme_test.dart
index 99d417a..d2c83b1 100644
--- a/packages/flutter/test/material/bottom_app_bar_theme_test.dart
+++ b/packages/flutter/test/material/bottom_app_bar_theme_test.dart
@@ -167,7 +167,7 @@
final PhysicalShape widget = _getBabRenderObject(tester);
- expect(widget.color, theme.colorScheme.surface);
+ expect(widget.color, theme.colorScheme.surfaceContainer);
expect(widget.elevation, equals(3.0));
});
diff --git a/packages/flutter/test/material/bottom_sheet_test.dart b/packages/flutter/test/material/bottom_sheet_test.dart
index 8d1358d..5ac634e 100644
--- a/packages/flutter/test/material/bottom_sheet_test.dart
+++ b/packages/flutter/test/material/bottom_sheet_test.dart
@@ -944,7 +944,8 @@
final Material material = tester.widget<Material>(finder);
expect(material.color, surfaceColor);
- expect(material.surfaceTintColor, surfaceTintColor);
+ // Surface tint is no longer used by default.
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.elevation, 1.0);
expect(material.shape, defaultShape);
expect(tester.getSize(finder).width, 640);
diff --git a/packages/flutter/test/material/bottom_sheet_theme_test.dart b/packages/flutter/test/material/bottom_sheet_theme_test.dart
index bf51ff1..a1a483a 100644
--- a/packages/flutter/test/material/bottom_sheet_theme_test.dart
+++ b/packages/flutter/test/material/bottom_sheet_theme_test.dart
@@ -99,7 +99,7 @@
);
final ThemeData theme = Theme.of(tester.element(find.byType(Scaffold)));
- expect(material.color, theme.colorScheme.surface);
+ expect(material.color, theme.colorScheme.surfaceContainerLow);
expect(material.elevation, 1.0);
expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(28.0))));
expect(material.clipBehavior, Clip.none);
@@ -273,7 +273,7 @@
);
expect(material.elevation, 1.0);
final ThemeData theme = Theme.of(tester.element(find.byType(Scaffold)));
- expect(material.color, theme.colorScheme.surface);
+ expect(material.color, theme.colorScheme.surfaceContainerLow);
});
testWidgets("Material2 - Modal bottom sheet-specific parameters don't apply to persistent bottom sheets", (WidgetTester tester) async {
diff --git a/packages/flutter/test/material/card_test.dart b/packages/flutter/test/material/card_test.dart
index 64a9e45..a0ab6df 100644
--- a/packages/flutter/test/material/card_test.dart
+++ b/packages/flutter/test/material/card_test.dart
@@ -24,9 +24,9 @@
expect(material.clipBehavior, Clip.none);
expect(material.elevation, 1.0);
expect(container.margin, const EdgeInsets.all(4.0));
- expect(material.color, colors.surface);
+ expect(material.color, colors.surfaceContainerLow);
expect(material.shadowColor, colors.shadow);
- expect(material.surfaceTintColor, colors.surfaceTint); // Default primary color
+ expect(material.surfaceTintColor, Colors.transparent); // Don't use surface tint. Toned surface container is used instead.
expect(material.shape, const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(12.0)),
));
@@ -48,7 +48,7 @@
expect(material.clipBehavior, Clip.none);
expect(material.elevation, 0.0);
expect(container.margin, const EdgeInsets.all(4.0));
- expect(material.color, colors.surfaceVariant);
+ expect(material.color, colors.surfaceContainerHighest);
expect(material.shadowColor, colors.shadow);
expect(material.surfaceTintColor, Colors.transparent);
expect(material.shape, const RoundedRectangleBorder(
@@ -74,7 +74,7 @@
expect(container.margin, const EdgeInsets.all(4.0));
expect(material.color, colors.surface);
expect(material.shadowColor, colors.shadow);
- expect(material.surfaceTintColor, colors.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.shape, RoundedRectangleBorder(
side: BorderSide(color: colors.outlineVariant),
borderRadius: const BorderRadius.all(Radius.circular(12.0)),
diff --git a/packages/flutter/test/material/card_theme_test.dart b/packages/flutter/test/material/card_theme_test.dart
index 2e22d13..2cb4748 100644
--- a/packages/flutter/test/material/card_theme_test.dart
+++ b/packages/flutter/test/material/card_theme_test.dart
@@ -35,9 +35,9 @@
final Material material = _getCardMaterial(tester);
expect(material.clipBehavior, Clip.none);
- expect(material.color, theme.colorScheme.surface);
+ expect(material.color, theme.colorScheme.surfaceContainerLow);
expect(material.shadowColor, theme.colorScheme.shadow);
- expect(material.surfaceTintColor, theme.colorScheme.surfaceTint); // Default primary color
+ expect(material.surfaceTintColor, Colors.transparent); // Default primary color
expect(material.elevation, 1.0);
expect(container.margin, const EdgeInsets.all(4.0));
expect(material.shape, const RoundedRectangleBorder(
@@ -128,7 +128,7 @@
));
final Material material = _getCardMaterial(tester);
- expect(material.color, themeData.colorScheme.surface);
+ expect(material.color, themeData.colorScheme.surfaceContainerLow);
});
testWidgets('Material3 - CardTheme customizes shape', (WidgetTester tester) async {
diff --git a/packages/flutter/test/material/checkbox_test.dart b/packages/flutter/test/material/checkbox_test.dart
index 74f89a0..dafa56c 100644
--- a/packages/flutter/test/material/checkbox_test.dart
+++ b/packages/flutter/test/material/checkbox_test.dart
@@ -1446,7 +1446,7 @@
expect(
Material.of(tester.element(find.byType(Checkbox))),
- paints..circle(color: colors.primary.withOpacity(0.12)),
+ paints..circle(color: colors.primary.withOpacity(0.1)),
reason: 'Default inactive pressed Checkbox should have overlay color from default fillColor',
);
@@ -1456,7 +1456,7 @@
expect(
Material.of(tester.element(find.byType(Checkbox))),
- paints..circle(color: colors.onSurface.withOpacity(0.12)),
+ paints..circle(color: colors.onSurface.withOpacity(0.1)),
reason: 'Default active pressed Checkbox should have overlay color from default fillColor',
);
@@ -1467,7 +1467,7 @@
expect(focusNode.hasPrimaryFocus, isTrue);
expect(
Material.of(tester.element(find.byType(Checkbox))),
- paints..circle(color: colors.onSurface.withOpacity(0.12)),
+ paints..circle(color: colors.onSurface.withOpacity(0.1)),
reason: 'Focused Checkbox should use default focused overlay color',
);
@@ -2025,7 +2025,7 @@
expect(focusNode.hasPrimaryFocus, isTrue);
expect(
Material.of(tester.element(find.byType(Checkbox))),
- paints..circle(color: themeData.colorScheme.error.withOpacity(0.12))..path(color: themeData.colorScheme.error)..path(color: themeData.colorScheme.onError)
+ paints..circle(color: themeData.colorScheme.error.withOpacity(0.1))..path(color: themeData.colorScheme.error)..path(color: themeData.colorScheme.onError)
);
// Default color
@@ -2057,7 +2057,7 @@
expect(
Material.of(tester.element(find.byType(Checkbox))),
paints
- ..circle(color: themeData.colorScheme.error.withOpacity(0.12))
+ ..circle(color: themeData.colorScheme.error.withOpacity(0.1))
..path(color: themeData.colorScheme.error)
);
await gestureLongPress.up();
diff --git a/packages/flutter/test/material/choice_chip_test.dart b/packages/flutter/test/material/choice_chip_test.dart
index 04a613d..441fac3 100644
--- a/packages/flutter/test/material/choice_chip_test.dart
+++ b/packages/flutter/test/material/choice_chip_test.dart
@@ -210,7 +210,7 @@
Material chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, Colors.transparent);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
RoundedRectangleBorder(
@@ -239,7 +239,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, Colors.transparent);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
RoundedRectangleBorder(
@@ -269,7 +269,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, null);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -298,7 +298,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, null);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -345,7 +345,7 @@
Material chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 1);
expect(chipMaterial.shadowColor, theme.colorScheme.shadow);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -355,7 +355,7 @@
);
ShapeDecoration decoration = tester.widget<Ink>(find.byType(Ink)).decoration! as ShapeDecoration;
- expect(decoration.color, null);
+ expect(decoration.color, theme.colorScheme.surfaceContainerLow);
// Test disabled ChoiceChip.elevated defaults.
await tester.pumpWidget(
@@ -374,7 +374,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, theme.colorScheme.shadow);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -404,7 +404,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 1);
expect(chipMaterial.shadowColor, null);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -433,7 +433,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, theme.colorScheme.shadow);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
diff --git a/packages/flutter/test/material/color_scheme_test.dart b/packages/flutter/test/material/color_scheme_test.dart
index c597a37..17eba66 100644
--- a/packages/flutter/test/material/color_scheme_test.dart
+++ b/packages/flutter/test/material/color_scheme_test.dart
@@ -249,36 +249,55 @@
test('can generate a light scheme from a seed color', () {
final ColorScheme scheme = ColorScheme.fromSeed(seedColor: Colors.blue);
- expect(scheme.primary, const Color(0xff0061a4));
+ expect(scheme.primary, const Color(0xff36618e));
expect(scheme.onPrimary, const Color(0xffffffff));
expect(scheme.primaryContainer, const Color(0xffd1e4ff));
expect(scheme.onPrimaryContainer, const Color(0xff001d36));
+ expect(scheme.primaryFixed, const Color(0xffd1e4ff));
+ expect(scheme.primaryFixedDim, const Color(0xffa0cafd));
+ expect(scheme.onPrimaryFixed, const Color(0xff001d36));
+ expect(scheme.onPrimaryFixedVariant, const Color(0xff194975));
expect(scheme.secondary, const Color(0xff535f70));
expect(scheme.onSecondary, const Color(0xffffffff));
expect(scheme.secondaryContainer, const Color(0xffd7e3f7));
expect(scheme.onSecondaryContainer, const Color(0xff101c2b));
+ expect(scheme.secondaryFixed, const Color(0xffd7e3f7));
+ expect(scheme.secondaryFixedDim, const Color(0xffbbc7db));
+ expect(scheme.onSecondaryFixed, const Color(0xff101c2b));
+ expect(scheme.onSecondaryFixedVariant, const Color(0xff3b4858));
expect(scheme.tertiary, const Color(0xff6b5778));
expect(scheme.onTertiary, const Color(0xffffffff));
expect(scheme.tertiaryContainer, const Color(0xfff2daff));
expect(scheme.onTertiaryContainer, const Color(0xff251431));
+ expect(scheme.tertiaryFixed, const Color(0xfff2daff));
+ expect(scheme.tertiaryFixedDim, const Color(0xffd6bee4));
+ expect(scheme.onTertiaryFixed, const Color(0xff251431));
+ expect(scheme.onTertiaryFixedVariant, const Color(0xff523f5f));
expect(scheme.error, const Color(0xffba1a1a));
expect(scheme.onError, const Color(0xffffffff));
expect(scheme.errorContainer, const Color(0xffffdad6));
expect(scheme.onErrorContainer, const Color(0xff410002));
expect(scheme.outline, const Color(0xff73777f));
expect(scheme.outlineVariant, const Color(0xffc3c7cf));
- expect(scheme.background, const Color(0xfffdfcff));
- expect(scheme.onBackground, const Color(0xff1a1c1e));
- expect(scheme.surface, const Color(0xfffdfcff));
- expect(scheme.onSurface, const Color(0xff1a1c1e));
+ expect(scheme.background, const Color(0xfff8f9ff));
+ expect(scheme.onBackground, const Color(0xff191c20));
+ expect(scheme.surface, const Color(0xfff8f9ff));
+ expect(scheme.surfaceBright, const Color(0xfff8f9ff));
+ expect(scheme.surfaceDim, const Color(0xffd8dae0));
+ expect(scheme.surfaceContainerLowest, const Color(0xffffffff));
+ expect(scheme.surfaceContainerLow, const Color(0xfff2f3fa));
+ expect(scheme.surfaceContainer, const Color(0xffeceef4));
+ expect(scheme.surfaceContainerHigh, const Color(0xffe6e8ee));
+ expect(scheme.surfaceContainerHighest, const Color(0xffe1e2e8));
+ expect(scheme.onSurface, const Color(0xff191c20));
expect(scheme.surfaceVariant, const Color(0xffdfe2eb));
expect(scheme.onSurfaceVariant, const Color(0xff43474e));
- expect(scheme.inverseSurface, const Color(0xff2f3033));
- expect(scheme.onInverseSurface, const Color(0xfff1f0f4));
- expect(scheme.inversePrimary, const Color(0xff9ecaff));
+ expect(scheme.inverseSurface, const Color(0xff2e3135));
+ expect(scheme.onInverseSurface, const Color(0xffeff0f7));
+ expect(scheme.inversePrimary, const Color(0xffa0cafd));
expect(scheme.shadow, const Color(0xff000000));
expect(scheme.scrim, const Color(0xff000000));
- expect(scheme.surfaceTint, const Color(0xff0061a4));
+ expect(scheme.surfaceTint, const Color(0xff36618e));
expect(scheme.brightness, Brightness.light);
});
@@ -289,14 +308,26 @@
onPrimary: const Color(0x00000002),
primaryContainer: const Color(0x00000003),
onPrimaryContainer: const Color(0x00000004),
+ primaryFixed: const Color(0x0000001D),
+ primaryFixedDim: const Color(0x0000001E),
+ onPrimaryFixed: const Color(0x0000001F),
+ onPrimaryFixedVariant: const Color(0x00000020),
secondary: const Color(0x00000005),
onSecondary: const Color(0x00000006),
secondaryContainer: const Color(0x00000007),
onSecondaryContainer: const Color(0x00000008),
+ secondaryFixed: const Color(0x00000021),
+ secondaryFixedDim: const Color(0x00000022),
+ onSecondaryFixed: const Color(0x00000023),
+ onSecondaryFixedVariant: const Color(0x00000024),
tertiary: const Color(0x00000009),
onTertiary: const Color(0x0000000A),
tertiaryContainer: const Color(0x0000000B),
onTertiaryContainer: const Color(0x0000000C),
+ tertiaryFixed: const Color(0x00000025),
+ tertiaryFixedDim: const Color(0x00000026),
+ onTertiaryFixed: const Color(0x00000027),
+ onTertiaryFixedVariant: const Color(0x00000028),
error: const Color(0x0000000D),
onError: const Color(0x0000000E),
errorContainer: const Color(0x0000000F),
@@ -304,6 +335,13 @@
background: const Color(0x00000011),
onBackground: const Color(0x00000012),
surface: const Color(0x00000013),
+ surfaceDim: const Color(0x00000029),
+ surfaceBright: const Color(0x0000002A),
+ surfaceContainerLowest: const Color(0x0000002B),
+ surfaceContainerLow: const Color(0x0000002C),
+ surfaceContainer: const Color(0x0000002D),
+ surfaceContainerHigh: const Color(0x0000002E),
+ surfaceContainerHighest: const Color(0x0000002F),
onSurface: const Color(0x00000014),
surfaceVariant: const Color(0x00000015),
onSurfaceVariant: const Color(0x00000016),
@@ -322,14 +360,26 @@
expect(scheme.onPrimary, const Color(0x00000002));
expect(scheme.primaryContainer, const Color(0x00000003));
expect(scheme.onPrimaryContainer, const Color(0x00000004));
+ expect(scheme.primaryFixed, const Color(0x0000001D));
+ expect(scheme.primaryFixedDim, const Color(0x0000001E));
+ expect(scheme.onPrimaryFixed, const Color(0x0000001F));
+ expect(scheme.onPrimaryFixedVariant, const Color(0x00000020));
expect(scheme.secondary, const Color(0x00000005));
expect(scheme.onSecondary, const Color(0x00000006));
expect(scheme.secondaryContainer, const Color(0x00000007));
expect(scheme.onSecondaryContainer, const Color(0x00000008));
+ expect(scheme.secondaryFixed, const Color(0x00000021));
+ expect(scheme.secondaryFixedDim, const Color(0x00000022));
+ expect(scheme.onSecondaryFixed, const Color(0x00000023));
+ expect(scheme.onSecondaryFixedVariant, const Color(0x00000024));
expect(scheme.tertiary, const Color(0x00000009));
expect(scheme.onTertiary, const Color(0x0000000A));
expect(scheme.tertiaryContainer, const Color(0x0000000B));
expect(scheme.onTertiaryContainer, const Color(0x0000000C));
+ expect(scheme.tertiaryFixed, const Color(0x00000025));
+ expect(scheme.tertiaryFixedDim, const Color(0x00000026));
+ expect(scheme.onTertiaryFixed, const Color(0x00000027));
+ expect(scheme.onTertiaryFixedVariant, const Color(0x00000028));
expect(scheme.error, const Color(0x0000000D));
expect(scheme.onError, const Color(0x0000000E));
expect(scheme.errorContainer, const Color(0x0000000F));
@@ -337,6 +387,13 @@
expect(scheme.background, const Color(0x00000011));
expect(scheme.onBackground, const Color(0x00000012));
expect(scheme.surface, const Color(0x00000013));
+ expect(scheme.surfaceDim, const Color(0x00000029));
+ expect(scheme.surfaceBright, const Color(0x0000002A));
+ expect(scheme.surfaceContainerLowest, const Color(0x0000002B));
+ expect(scheme.surfaceContainerLow, const Color(0x0000002C));
+ expect(scheme.surfaceContainer, const Color(0x0000002D));
+ expect(scheme.surfaceContainerHigh, const Color(0x0000002E));
+ expect(scheme.surfaceContainerHighest, const Color(0x0000002F));
expect(scheme.onSurface, const Color(0x00000014));
expect(scheme.surfaceVariant, const Color(0x00000015));
expect(scheme.onSurfaceVariant, const Color(0x00000016));
@@ -352,36 +409,55 @@
test('can generate a dark scheme from a seed color', () {
final ColorScheme scheme = ColorScheme.fromSeed(seedColor: Colors.blue, brightness: Brightness.dark);
- expect(scheme.primary, const Color(0xff9ecaff));
+ expect(scheme.primary, const Color(0xffa0cafd));
expect(scheme.onPrimary, const Color(0xff003258));
- expect(scheme.primaryContainer, const Color(0xff00497d));
+ expect(scheme.primaryContainer, const Color(0xff194975));
expect(scheme.onPrimaryContainer, const Color(0xffd1e4ff));
+ expect(scheme.primaryFixed, const Color(0xffd1e4ff));
+ expect(scheme.primaryFixedDim, const Color(0xffa0cafd));
+ expect(scheme.onPrimaryFixed, const Color(0xff001d36));
+ expect(scheme.onPrimaryFixedVariant, const Color(0xff194975));
expect(scheme.secondary, const Color(0xffbbc7db));
expect(scheme.onSecondary, const Color(0xff253140));
expect(scheme.secondaryContainer, const Color(0xff3b4858));
expect(scheme.onSecondaryContainer, const Color(0xffd7e3f7));
+ expect(scheme.secondaryFixed, const Color(0xffd7e3f7));
+ expect(scheme.secondaryFixedDim, const Color(0xffbbc7db));
+ expect(scheme.onSecondaryFixed, const Color(0xff101c2b));
+ expect(scheme.onSecondaryFixedVariant, const Color(0xff3b4858));
expect(scheme.tertiary, const Color(0xffd6bee4));
expect(scheme.onTertiary, const Color(0xff3b2948));
expect(scheme.tertiaryContainer, const Color(0xff523f5f));
expect(scheme.onTertiaryContainer, const Color(0xfff2daff));
+ expect(scheme.tertiaryFixed, const Color(0xfff2daff));
+ expect(scheme.tertiaryFixedDim, const Color(0xffd6bee4));
+ expect(scheme.onTertiaryFixed, const Color(0xff251431));
+ expect(scheme.onTertiaryFixedVariant, const Color(0xff523f5f));
expect(scheme.error, const Color(0xffffb4ab));
expect(scheme.onError, const Color(0xff690005));
expect(scheme.errorContainer, const Color(0xff93000a));
- expect(scheme.onErrorContainer, const Color(0xffffb4ab));
+ expect(scheme.onErrorContainer, const Color(0xffffdad6));
expect(scheme.outline, const Color(0xff8d9199));
expect(scheme.outlineVariant, const Color(0xff43474e));
- expect(scheme.background, const Color(0xff1a1c1e));
- expect(scheme.onBackground, const Color(0xffe2e2e6));
- expect(scheme.surface, const Color(0xff1a1c1e));
- expect(scheme.onSurface, const Color(0xffe2e2e6));
+ expect(scheme.background, const Color(0xff111418));
+ expect(scheme.onBackground, const Color(0xffe1e2e8));
+ expect(scheme.surface, const Color(0xff111418));
+ expect(scheme.surfaceDim, const Color(0xff111418));
+ expect(scheme.surfaceBright, const Color(0xff36393e));
+ expect(scheme.surfaceContainerLowest, const Color(0xff0b0e13));
+ expect(scheme.surfaceContainerLow, const Color(0xff191c20));
+ expect(scheme.surfaceContainer, const Color(0xff1d2024));
+ expect(scheme.surfaceContainerHigh, const Color(0xff272a2f));
+ expect(scheme.surfaceContainerHighest, const Color(0xff32353a));
+ expect(scheme.onSurface, const Color(0xffe1e2e8));
expect(scheme.surfaceVariant, const Color(0xff43474e));
expect(scheme.onSurfaceVariant, const Color(0xffc3c7cf));
- expect(scheme.inverseSurface, const Color(0xffe2e2e6));
- expect(scheme.onInverseSurface, const Color(0xff2f3033));
- expect(scheme.inversePrimary, const Color(0xff0061a4));
+ expect(scheme.inverseSurface, const Color(0xffe1e2e8));
+ expect(scheme.onInverseSurface, const Color(0xff2e3135));
+ expect(scheme.inversePrimary, const Color(0xff36618e));
expect(scheme.shadow, const Color(0xff000000));
expect(scheme.scrim, const Color(0xff000000));
- expect(scheme.surfaceTint, const Color(0xff9ecaff));
+ expect(scheme.surfaceTint, const Color(0xffa0cafd));
expect(scheme.brightness, Brightness.dark);
});
@@ -397,14 +473,26 @@
expect(scheme.onPrimary, baseScheme.onPrimary);
expect(scheme.primaryContainer, baseScheme.primaryContainer);
expect(scheme.onPrimaryContainer, baseScheme.onPrimaryContainer);
+ expect(scheme.primaryFixed, baseScheme.primaryFixed);
+ expect(scheme.primaryFixedDim, baseScheme.primaryFixedDim);
+ expect(scheme.onPrimaryFixed, baseScheme.onPrimaryFixed);
+ expect(scheme.onPrimaryFixedVariant, baseScheme.onPrimaryFixedVariant);
expect(scheme.secondary, baseScheme.secondary);
expect(scheme.onSecondary, baseScheme.onSecondary);
expect(scheme.secondaryContainer, baseScheme.secondaryContainer);
expect(scheme.onSecondaryContainer, baseScheme.onSecondaryContainer);
+ expect(scheme.secondaryFixed, baseScheme.secondaryFixed);
+ expect(scheme.secondaryFixedDim, baseScheme.secondaryFixedDim);
+ expect(scheme.onSecondaryFixed, baseScheme.onSecondaryFixed);
+ expect(scheme.onSecondaryFixedVariant, baseScheme.onSecondaryFixedVariant);
expect(scheme.tertiary, baseScheme.tertiary);
expect(scheme.onTertiary, baseScheme.onTertiary);
expect(scheme.tertiaryContainer, baseScheme.tertiaryContainer);
expect(scheme.onTertiaryContainer, baseScheme.onTertiaryContainer);
+ expect(scheme.tertiaryFixed, baseScheme.tertiaryFixed);
+ expect(scheme.tertiaryFixedDim, baseScheme.tertiaryFixedDim);
+ expect(scheme.onTertiaryFixed, baseScheme.onTertiaryFixed);
+ expect(scheme.onTertiaryFixedVariant, baseScheme.onTertiaryFixedVariant);
expect(scheme.error, baseScheme.error);
expect(scheme.onError, baseScheme.onError);
expect(scheme.errorContainer, baseScheme.errorContainer);
@@ -414,6 +502,13 @@
expect(scheme.background, baseScheme.background);
expect(scheme.onBackground, baseScheme.onBackground);
expect(scheme.surface, baseScheme.surface);
+ expect(scheme.surfaceBright, baseScheme.surfaceBright);
+ expect(scheme.surfaceDim, baseScheme.surfaceDim);
+ expect(scheme.surfaceContainerLowest, baseScheme.surfaceContainerLowest);
+ expect(scheme.surfaceContainerLow, baseScheme.surfaceContainerLow);
+ expect(scheme.surfaceContainer, baseScheme.surfaceContainer);
+ expect(scheme.surfaceContainerHigh, baseScheme.surfaceContainerHigh);
+ expect(scheme.surfaceContainerHighest, baseScheme.surfaceContainerHighest);
expect(scheme.onSurface, baseScheme.onSurface);
expect(scheme.surfaceVariant, baseScheme.surfaceVariant);
expect(scheme.onSurfaceVariant, baseScheme.onSurfaceVariant);
@@ -434,36 +529,55 @@
await ColorScheme.fromImageProvider(provider: image);
expect(scheme.brightness, Brightness.light);
- expect(scheme.primary, const Color(0xff4040f3));
+ expect(scheme.primary, const Color(0xff575992));
expect(scheme.onPrimary, const Color(0xffffffff));
expect(scheme.primaryContainer, const Color(0xffe1e0ff));
- expect(scheme.onPrimaryContainer, const Color(0xff06006c));
+ expect(scheme.onPrimaryContainer, const Color(0xff13144b));
+ expect(scheme.primaryFixed, const Color(0xffe1e0ff));
+ expect(scheme.primaryFixedDim, const Color(0xffc0c1ff));
+ expect(scheme.onPrimaryFixed, const Color(0xff13144b));
+ expect(scheme.onPrimaryFixedVariant, const Color(0xff3f4178));
expect(scheme.secondary, const Color(0xff5d5c72));
expect(scheme.onSecondary, const Color(0xffffffff));
expect(scheme.secondaryContainer, const Color(0xffe2e0f9));
expect(scheme.onSecondaryContainer, const Color(0xff191a2c));
+ expect(scheme.secondaryFixed, const Color(0xffe2e0f9));
+ expect(scheme.secondaryFixedDim, const Color(0xffc6c4dd));
+ expect(scheme.onSecondaryFixed, const Color(0xff191a2c));
+ expect(scheme.onSecondaryFixedVariant, const Color(0xff454559));
expect(scheme.tertiary, const Color(0xff79536a));
expect(scheme.onTertiary, const Color(0xffffffff));
expect(scheme.tertiaryContainer, const Color(0xffffd8ec));
expect(scheme.onTertiaryContainer, const Color(0xff2e1125));
+ expect(scheme.tertiaryFixed, const Color(0xffffd8ec));
+ expect(scheme.tertiaryFixedDim, const Color(0xffe9b9d3));
+ expect(scheme.onTertiaryFixed, const Color(0xff2e1125));
+ expect(scheme.onTertiaryFixedVariant, const Color(0xff5f3c51));
expect(scheme.error, const Color(0xffba1a1a));
expect(scheme.onError, const Color(0xffffffff));
expect(scheme.errorContainer, const Color(0xffffdad6));
expect(scheme.onErrorContainer, const Color(0xff410002));
- expect(scheme.background, const Color(0xfffffbff));
- expect(scheme.onBackground, const Color(0xff1c1b1f));
- expect(scheme.surface, const Color(0xfffffbff));
- expect(scheme.onSurface, const Color(0xff1c1b1f));
+ expect(scheme.background, const Color(0xfffcf8ff));
+ expect(scheme.onBackground, const Color(0xff1b1b21));
+ expect(scheme.surface, const Color(0xfffcf8ff));
+ expect(scheme.surfaceDim, const Color(0xffdcd9e0));
+ expect(scheme.surfaceBright, const Color(0xfffcf8ff));
+ expect(scheme.surfaceContainerLowest, const Color(0xffffffff));
+ expect(scheme.surfaceContainerLow, const Color(0xfff6f2fa));
+ expect(scheme.surfaceContainer, const Color(0xfff0ecf4));
+ expect(scheme.surfaceContainerHigh, const Color(0xffeae7ef));
+ expect(scheme.surfaceContainerHighest, const Color(0xffe4e1e9));
+ expect(scheme.onSurface, const Color(0xff1b1b21));
expect(scheme.surfaceVariant, const Color(0xffe4e1ec));
expect(scheme.onSurfaceVariant, const Color(0xff46464f));
expect(scheme.outline, const Color(0xff777680));
expect(scheme.outlineVariant, const Color(0xffc8c5d0));
expect(scheme.shadow, const Color(0xff000000));
expect(scheme.scrim, const Color(0xff000000));
- expect(scheme.inverseSurface, const Color(0xff313034));
- expect(scheme.onInverseSurface, const Color(0xfff3eff4));
+ expect(scheme.inverseSurface, const Color(0xff303036));
+ expect(scheme.onInverseSurface, const Color(0xfff3eff7));
expect(scheme.inversePrimary, const Color(0xffc0c1ff));
- expect(scheme.surfaceTint, const Color(0xff4040f3));
+ expect(scheme.surfaceTint, const Color(0xff575992));
}, skip: isBrowser, // [intended] uses dart:typed_data.
);
@@ -475,32 +589,51 @@
provider: image, brightness: Brightness.dark);
expect(scheme.primary, const Color(0xffc0c1ff));
- expect(scheme.onPrimary, const Color(0xff0f00aa));
- expect(scheme.primaryContainer, const Color(0xff2218dd));
+ expect(scheme.onPrimary, const Color(0xff292a60));
+ expect(scheme.primaryContainer, const Color(0xff3f4178));
expect(scheme.onPrimaryContainer, const Color(0xffe1e0ff));
+ expect(scheme.primaryFixed, const Color(0xffe1e0ff));
+ expect(scheme.primaryFixedDim, const Color(0xffc0c1ff));
+ expect(scheme.onPrimaryFixed, const Color(0xff13144b));
+ expect(scheme.onPrimaryFixedVariant, const Color(0xff3f4178));
expect(scheme.secondary, const Color(0xffc6c4dd));
expect(scheme.onSecondary, const Color(0xff2e2f42));
expect(scheme.secondaryContainer, const Color(0xff454559));
expect(scheme.onSecondaryContainer, const Color(0xffe2e0f9));
+ expect(scheme.secondaryFixed, const Color(0xffe2e0f9));
+ expect(scheme.secondaryFixedDim, const Color(0xffc6c4dd));
+ expect(scheme.onSecondaryFixed, const Color(0xff191a2c));
+ expect(scheme.onSecondaryFixedVariant, const Color(0xff454559));
expect(scheme.tertiary, const Color(0xffe9b9d3));
expect(scheme.onTertiary, const Color(0xff46263a));
expect(scheme.tertiaryContainer, const Color(0xff5f3c51));
expect(scheme.onTertiaryContainer, const Color(0xffffd8ec));
+ expect(scheme.tertiaryFixed, const Color(0xffffd8ec));
+ expect(scheme.tertiaryFixedDim, const Color(0xffe9b9d3));
+ expect(scheme.onTertiaryFixed, const Color(0xff2e1125));
+ expect(scheme.onTertiaryFixedVariant, const Color(0xff5f3c51));
expect(scheme.error, const Color(0xffffb4ab));
expect(scheme.onError, const Color(0xff690005));
expect(scheme.errorContainer, const Color(0xff93000a));
- expect(scheme.onErrorContainer, const Color(0xffffb4ab));
- expect(scheme.background, const Color(0xff1c1b1f));
- expect(scheme.onBackground, const Color(0xffe5e1e6));
- expect(scheme.surface, const Color(0xff1c1b1f));
- expect(scheme.onSurface, const Color(0xffe5e1e6));
+ expect(scheme.onErrorContainer, const Color(0xffffdad6));
+ expect(scheme.background, const Color(0xff131318));
+ expect(scheme.onBackground, const Color(0xffe4e1e9));
+ expect(scheme.surface, const Color(0xff131318));
+ expect(scheme.surfaceDim, const Color(0xff131318));
+ expect(scheme.surfaceBright, const Color(0xff39383f));
+ expect(scheme.surfaceContainerLowest, const Color(0xff0e0e13));
+ expect(scheme.surfaceContainerLow, const Color(0xff1b1b21));
+ expect(scheme.surfaceContainer, const Color(0xff1f1f25));
+ expect(scheme.surfaceContainerHigh, const Color(0xff2a292f));
+ expect(scheme.surfaceContainerHighest, const Color(0xff35343a));
+ expect(scheme.onSurface, const Color(0xffe4e1e9));
expect(scheme.surfaceVariant, const Color(0xff46464f));
expect(scheme.onSurfaceVariant, const Color(0xffc8c5d0));
expect(scheme.outline, const Color(0xff918f9a));
expect(scheme.outlineVariant, const Color(0xff46464f));
- expect(scheme.inverseSurface, const Color(0xffe5e1e6));
- expect(scheme.onInverseSurface, const Color(0xff313034));
- expect(scheme.inversePrimary, const Color(0xff4040f3));
+ expect(scheme.inverseSurface, const Color(0xffe4e1e9));
+ expect(scheme.onInverseSurface, const Color(0xff303036));
+ expect(scheme.inversePrimary, const Color(0xff575992));
expect(scheme.surfaceTint, const Color(0xffc0c1ff));
}, skip: isBrowser, // [intended] uses dart:isolate and io.
);
diff --git a/packages/flutter/test/material/date_picker_test.dart b/packages/flutter/test/material/date_picker_test.dart
index 48d90f4..177a798 100644
--- a/packages/flutter/test/material/date_picker_test.dart
+++ b/packages/flutter/test/material/date_picker_test.dart
@@ -166,9 +166,9 @@
matching: find.byType(Material),
).first);
- expect(dialogMaterial.color, theme.colorScheme.surface);
+ expect(dialogMaterial.color, theme.colorScheme.surfaceContainerHigh);
expect(dialogMaterial.shadowColor, Colors.transparent);
- expect(dialogMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(dialogMaterial.surfaceTintColor, Colors.transparent);
expect(dialogMaterial.elevation, 6.0);
expect(
dialogMaterial.shape,
@@ -1290,7 +1290,7 @@
await tester.pumpAndSettle();
expect(
Material.of(tester.element(find.text('30'))),
- paints..circle()..circle(color: material3 ? theme.colorScheme.onSurfaceVariant.withOpacity(0.12) : theme.colorScheme.onSurfaceVariant.withOpacity(0.12))
+ paints..circle()..circle(color: material3 ? theme.colorScheme.onSurfaceVariant.withOpacity(0.1) : theme.colorScheme.onSurfaceVariant.withOpacity(0.12))
);
await gesture.up();
await tester.pumpAndSettle();
diff --git a/packages/flutter/test/material/date_picker_theme_test.dart b/packages/flutter/test/material/date_picker_theme_test.dart
index 58bb87a..571af49 100644
--- a/packages/flutter/test/material/date_picker_theme_test.dart
+++ b/packages/flutter/test/material/date_picker_theme_test.dart
@@ -157,10 +157,10 @@
),
);
- expect(m3.backgroundColor, colorScheme.surface);
+ expect(m3.backgroundColor, colorScheme.surfaceContainerHigh);
expect(m3.elevation, 6);
expect(m3.shadowColor, const Color(0x00000000)); // Colors.transparent
- expect(m3.surfaceTintColor, colorScheme.surfaceTint);
+ expect(m3.surfaceTintColor, Colors.transparent);
expect(m3.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(28)));
expect(m3.headerBackgroundColor, const Color(0x00000000)); // Colors.transparent
expect(m3.headerForegroundColor, colorScheme.onSurfaceVariant);
@@ -175,14 +175,14 @@
expect(m3.dayBackgroundColor?.resolve(<MaterialState>{MaterialState.selected}), colorScheme.primary);
expect(m3.dayOverlayColor?.resolve(<MaterialState>{}), null);
expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.hovered}), colorScheme.onPrimary.withOpacity(0.08));
- expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.focused}), colorScheme.onPrimary.withOpacity(0.12));
+ expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.focused}), colorScheme.onPrimary.withOpacity(0.1));
expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.hovered}), colorScheme.onSurfaceVariant.withOpacity(0.08));
- expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.focused}), colorScheme.onSurfaceVariant.withOpacity(0.12));
- expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.pressed}), colorScheme.onSurfaceVariant.withOpacity(0.12));
+ expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.focused}), colorScheme.onSurfaceVariant.withOpacity(0.1));
+ expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.pressed}), colorScheme.onSurfaceVariant.withOpacity(0.1));
expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.hovered, MaterialState.focused}), colorScheme.onPrimary.withOpacity(0.08));
- expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.hovered, MaterialState.pressed}), colorScheme.onPrimary.withOpacity(0.12));
+ expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.hovered, MaterialState.pressed}), colorScheme.onPrimary.withOpacity(0.1));
expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.hovered, MaterialState.focused}), colorScheme.onSurfaceVariant.withOpacity(0.08));
- expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.hovered, MaterialState.pressed}), colorScheme.onSurfaceVariant.withOpacity(0.12));
+ expect(m3.dayOverlayColor?.resolve(<MaterialState>{MaterialState.hovered, MaterialState.pressed}), colorScheme.onSurfaceVariant.withOpacity(0.1));
expect(m3.todayForegroundColor?.resolve(<MaterialState>{}), colorScheme.primary);
expect(m3.todayForegroundColor?.resolve(<MaterialState>{MaterialState.disabled}), colorScheme.primary.withOpacity(0.38));
expect(m3.todayBorder, BorderSide(color: colorScheme.primary));
@@ -194,10 +194,10 @@
expect(m3.yearBackgroundColor?.resolve(<MaterialState>{MaterialState.selected}), colorScheme.primary);
expect(m3.yearOverlayColor?.resolve(<MaterialState>{}), null);
expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.hovered}), colorScheme.onPrimary.withOpacity(0.08));
- expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.focused}), colorScheme.onPrimary.withOpacity(0.12));
+ expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.selected, MaterialState.focused}), colorScheme.onPrimary.withOpacity(0.1));
expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.hovered}), colorScheme.onSurfaceVariant.withOpacity(0.08));
- expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.focused}), colorScheme.onSurfaceVariant.withOpacity(0.12));
- expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.pressed}), colorScheme.onSurfaceVariant.withOpacity(0.12));
+ expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.focused}), colorScheme.onSurfaceVariant.withOpacity(0.1));
+ expect(m3.yearOverlayColor?.resolve(<MaterialState>{MaterialState.pressed}), colorScheme.onSurfaceVariant.withOpacity(0.1));
expect(m3.rangePickerElevation, 0);
expect(m3.rangePickerShape, const RoundedRectangleBorder());
expect(m3.rangePickerShadowColor, Colors.transparent);
diff --git a/packages/flutter/test/material/date_range_picker_test.dart b/packages/flutter/test/material/date_range_picker_test.dart
index eb5b71f..44b9a76 100644
--- a/packages/flutter/test/material/date_range_picker_test.dart
+++ b/packages/flutter/test/material/date_range_picker_test.dart
@@ -181,7 +181,7 @@
matching: find.byType(Material),
).first);
- expect(dialogMaterial.color, theme.colorScheme.surface);
+ expect(dialogMaterial.color, theme.colorScheme.surfaceContainerHigh);
expect(dialogMaterial.shadowColor, Colors.transparent);
expect(dialogMaterial.surfaceTintColor, Colors.transparent);
expect(dialogMaterial.elevation, 0.0);
@@ -201,7 +201,7 @@
matching: find.byType(Material),
).first);
- expect(dialogMaterial.color, theme.colorScheme.surface);
+ expect(dialogMaterial.color, theme.colorScheme.surfaceContainerHigh);
expect(dialogMaterial.shadowColor, Colors.transparent);
expect(dialogMaterial.surfaceTintColor, Colors.transparent);
expect(dialogMaterial.elevation, 0.0);
@@ -798,9 +798,9 @@
matching: find.byType(Material),
).first);
- expect(dialogMaterial.color, theme.colorScheme.surface);
+ expect(dialogMaterial.color, theme.colorScheme.surfaceContainerHigh);
expect(dialogMaterial.shadowColor, Colors.transparent);
- expect(dialogMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(dialogMaterial.surfaceTintColor, Colors.transparent);
expect(dialogMaterial.elevation, 6.0);
expect(
dialogMaterial.shape,
diff --git a/packages/flutter/test/material/drawer_theme_test.dart b/packages/flutter/test/material/drawer_theme_test.dart
index c7a24d2..6b3bf17 100644
--- a/packages/flutter/test/material/drawer_theme_test.dart
+++ b/packages/flutter/test/material/drawer_theme_test.dart
@@ -97,10 +97,10 @@
scaffoldKey.currentState!.openDrawer();
await tester.pumpAndSettle();
- expect(_drawerMaterial(tester).color, theme.colorScheme.surface);
+ expect(_drawerMaterial(tester).color, theme.colorScheme.surfaceContainerLow);
expect(_drawerMaterial(tester).elevation, 1.0);
expect(_drawerMaterial(tester).shadowColor, Colors.transparent);
- expect(_drawerMaterial(tester).surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(_drawerMaterial(tester).surfaceTintColor, Colors.transparent);
expect(
_drawerMaterial(tester).shape,
const RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(right: Radius.circular(16.0)))
@@ -148,10 +148,10 @@
scaffoldKey.currentState!.openEndDrawer();
await tester.pumpAndSettle();
- expect(_drawerMaterial(tester).color, theme.colorScheme.surface);
+ expect(_drawerMaterial(tester).color, theme.colorScheme.surfaceContainerLow);
expect(_drawerMaterial(tester).elevation, 1.0);
expect(_drawerMaterial(tester).shadowColor, Colors.transparent);
- expect(_drawerMaterial(tester).surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(_drawerMaterial(tester).surfaceTintColor, Colors.transparent);
expect(
_drawerMaterial(tester).shape,
const RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(16.0)))
diff --git a/packages/flutter/test/material/dropdown_menu_test.dart b/packages/flutter/test/material/dropdown_menu_test.dart
index 683ca4f..243e59e 100644
--- a/packages/flutter/test/material/dropdown_menu_test.dart
+++ b/packages/flutter/test/material/dropdown_menu_test.dart
@@ -62,9 +62,9 @@
matching: find.byType(Material),
).at(1);
Material material = tester.widget<Material>(menuMaterial);
- expect(material.color, themeData.colorScheme.surface);
+ expect(material.color, themeData.colorScheme.surfaceContainer);
expect(material.shadowColor, themeData.colorScheme.shadow);
- expect(material.surfaceTintColor, themeData.colorScheme.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.elevation, 3.0);
expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
diff --git a/packages/flutter/test/material/dropdown_menu_theme_test.dart b/packages/flutter/test/material/dropdown_menu_theme_test.dart
index 2c02c78..432f786 100644
--- a/packages/flutter/test/material/dropdown_menu_theme_test.dart
+++ b/packages/flutter/test/material/dropdown_menu_theme_test.dart
@@ -81,9 +81,9 @@
matching: find.byType(Material),
).at(1);
Material material = tester.widget<Material>(menuMaterial);
- expect(material.color, themeData.colorScheme.surface);
+ expect(material.color, themeData.colorScheme.surfaceContainer);
expect(material.shadowColor, themeData.colorScheme.shadow);
- expect(material.surfaceTintColor, themeData.colorScheme.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.elevation, 3.0);
expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
diff --git a/packages/flutter/test/material/elevated_button_test.dart b/packages/flutter/test/material/elevated_button_test.dart
index f3042f5..2e9d958 100644
--- a/packages/flutter/test/material/elevated_button_test.dart
+++ b/packages/flutter/test/material/elevated_button_test.dart
@@ -285,7 +285,7 @@
await gesture.down(center);
await tester.pumpAndSettle();
expect(elevation(), 1.0);
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -296,7 +296,7 @@
focusNode.requestFocus();
await tester.pumpAndSettle();
expect(elevation(), 1.0);
- expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
focusNode.dispose();
});
diff --git a/packages/flutter/test/material/elevated_button_theme_test.dart b/packages/flutter/test/material/elevated_button_theme_test.dart
index 1957b74..4645c50 100644
--- a/packages/flutter/test/material/elevated_button_theme_test.dart
+++ b/packages/flutter/test/material/elevated_button_theme_test.dart
@@ -178,8 +178,8 @@
expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, disabled), disabledMouseCursor);
expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.08));
- expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.24));
- expect(inkWell.overlayColor!.resolve(pressed), foregroundColor.withOpacity(0.24));
+ expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.1));
+ expect(inkWell.overlayColor!.resolve(pressed), foregroundColor.withOpacity(0.1));
expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null);
expect(material.shape, shape);
diff --git a/packages/flutter/test/material/filled_button_test.dart b/packages/flutter/test/material/filled_button_test.dart
index 0827808..e0dcc9f 100644
--- a/packages/flutter/test/material/filled_button_test.dart
+++ b/packages/flutter/test/material/filled_button_test.dart
@@ -413,7 +413,7 @@
await gesture.down(center);
await tester.pumpAndSettle();
expect(elevation(), 0.0);
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onPrimary.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -424,7 +424,7 @@
focusNode.requestFocus();
await tester.pumpAndSettle();
expect(elevation(), 0.0);
- expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.1)));
focusNode.dispose();
});
@@ -479,7 +479,7 @@
await gesture.down(center);
await tester.pumpAndSettle();
expect(elevation(), 0.0);
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -490,7 +490,7 @@
focusNode.requestFocus();
await tester.pumpAndSettle();
expect(elevation(), 0.0);
- expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.1)));
focusNode.dispose();
});
diff --git a/packages/flutter/test/material/filled_button_theme_test.dart b/packages/flutter/test/material/filled_button_theme_test.dart
index 5b0d7c4..e3a5fa5 100644
--- a/packages/flutter/test/material/filled_button_theme_test.dart
+++ b/packages/flutter/test/material/filled_button_theme_test.dart
@@ -142,8 +142,8 @@
expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor>(inkWell.mouseCursor!, disabled), disabledMouseCursor);
expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.08));
- expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.12));
- expect(inkWell.overlayColor!.resolve(pressed), foregroundColor.withOpacity(0.12));
+ expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.1));
+ expect(inkWell.overlayColor!.resolve(pressed), foregroundColor.withOpacity(0.1));
expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null);
expect(material.shape, shape);
diff --git a/packages/flutter/test/material/filter_chip_test.dart b/packages/flutter/test/material/filter_chip_test.dart
index 0265c6b..ec24e44 100644
--- a/packages/flutter/test/material/filter_chip_test.dart
+++ b/packages/flutter/test/material/filter_chip_test.dart
@@ -275,7 +275,7 @@
Material chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, Colors.transparent);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
RoundedRectangleBorder(
@@ -304,7 +304,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, Colors.transparent);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
RoundedRectangleBorder(
@@ -334,7 +334,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, null);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -364,7 +364,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, null);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -410,7 +410,7 @@
Material chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 1);
expect(chipMaterial.shadowColor, theme.colorScheme.shadow);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -420,7 +420,7 @@
);
ShapeDecoration decoration = tester.widget<Ink>(find.byType(Ink)).decoration! as ShapeDecoration;
- expect(decoration.color, null);
+ expect(decoration.color, theme.colorScheme.surfaceContainerLow);
// Test disabled FilterChip.elevated defaults.
await tester.pumpWidget(
@@ -439,7 +439,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, theme.colorScheme.shadow);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -469,7 +469,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 1);
expect(chipMaterial.shadowColor, null);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
@@ -499,7 +499,7 @@
chipMaterial = getMaterial(tester);
expect(chipMaterial.elevation, 0);
expect(chipMaterial.shadowColor, null);
- expect(chipMaterial.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(chipMaterial.surfaceTintColor, Colors.transparent);
expect(
chipMaterial.shape,
const RoundedRectangleBorder(
diff --git a/packages/flutter/test/material/floating_action_button_theme_test.dart b/packages/flutter/test/material/floating_action_button_theme_test.dart
index f3d54f6..17c62e7 100644
--- a/packages/flutter/test/material/floating_action_button_theme_test.dart
+++ b/packages/flutter/test/material/floating_action_button_theme_test.dart
@@ -38,7 +38,7 @@
expect(_getRawMaterialButton(tester).elevation, 6);
expect(_getRawMaterialButton(tester).highlightElevation, 6);
expect(_getRawMaterialButton(tester).shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(16.0))));
- expect(_getRawMaterialButton(tester).splashColor, colorScheme.onPrimaryContainer.withOpacity(0.12));
+ expect(_getRawMaterialButton(tester).splashColor, colorScheme.onPrimaryContainer.withOpacity(0.1));
expect(_getRawMaterialButton(tester).constraints, const BoxConstraints.tightFor(width: 56.0, height: 56.0));
expect(_getIconSize(tester).width, 24.0);
expect(_getIconSize(tester).height, 24.0);
diff --git a/packages/flutter/test/material/icon_button_test.dart b/packages/flutter/test/material/icon_button_test.dart
index 80d91f9..2a74cf2 100644
--- a/packages/flutter/test/material/icon_button_test.dart
+++ b/packages/flutter/test/material/icon_button_test.dart
@@ -1239,7 +1239,7 @@
// Highlighted (pressed).
await gesture.down(center);
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -1249,7 +1249,7 @@
// Focused.
focusNode.requestFocus();
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.1)));
focusNode.dispose();
});
@@ -1380,7 +1380,7 @@
// Highlighted (pressed).
await gesture.down(center);
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onPrimary.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -1390,7 +1390,7 @@
// Focused.
focusNode.requestFocus();
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.1)));
focusNode.dispose();
});
@@ -1636,7 +1636,7 @@
// Highlighted (pressed).
await gesture.down(center);
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -1646,7 +1646,7 @@
// Focused.
focusNode.requestFocus();
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.1)));
focusNode.dispose();
});
@@ -1892,7 +1892,7 @@
// Highlighted (pressed).
await gesture.down(center);
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
diff --git a/packages/flutter/test/material/icon_button_theme_test.dart b/packages/flutter/test/material/icon_button_theme_test.dart
index 7cc64cf..4acf180 100644
--- a/packages/flutter/test/material/icon_button_theme_test.dart
+++ b/packages/flutter/test/material/icon_button_theme_test.dart
@@ -135,8 +135,8 @@
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, disabled), disabledMouseCursor);
expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.08));
- expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.08));
- expect(inkWell.overlayColor!.resolve(pressed), foregroundColor.withOpacity(0.12));
+ expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.1));
+ expect(inkWell.overlayColor!.resolve(pressed), foregroundColor.withOpacity(0.1));
expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null);
expect(material.shape, shape);
diff --git a/packages/flutter/test/material/list_tile_test.dart b/packages/flutter/test/material/list_tile_test.dart
index 5e7dd85..5b5947a 100644
--- a/packages/flutter/test/material/list_tile_test.dart
+++ b/packages/flutter/test/material/list_tile_test.dart
@@ -1380,7 +1380,7 @@
find.byType(Material),
paints
..path(color: const Color(0xff000000))
- ..path(color: const Color(0xffece6f3))
+ ..path(color: const Color(0xfff7f2fa))
..save()
..save(),
);
@@ -1394,7 +1394,7 @@
find.byType(Material),
paints
..path(color: const Color(0xff000000))
- ..path(color: const Color(0xffece6f3))
+ ..path(color: const Color(0xfff7f2fa))
..save()
..save(),
);
diff --git a/packages/flutter/test/material/menu_anchor_test.dart b/packages/flutter/test/material/menu_anchor_test.dart
index 56ce7b4..88d7620 100644
--- a/packages/flutter/test/material/menu_anchor_test.dart
+++ b/packages/flutter/test/material/menu_anchor_test.dart
@@ -289,9 +289,9 @@
Material material = tester.widget<Material>(menuMaterial);
expect(opened, isEmpty);
- expect(material.color, themeData.colorScheme.surface);
+ expect(material.color, themeData.colorScheme.surfaceContainer);
expect(material.shadowColor, themeData.colorScheme.shadow);
- expect(material.surfaceTintColor, themeData.colorScheme.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.elevation, 3.0);
expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
@@ -322,9 +322,9 @@
material = tester.widget<Material>(menuMaterial);
expect(opened.last, equals(TestMenu.mainMenu1));
- expect(material.color, themeData.colorScheme.surface);
+ expect(material.color, themeData.colorScheme.surfaceContainer);
expect(material.shadowColor, themeData.colorScheme.shadow);
- expect(material.surfaceTintColor, themeData.colorScheme.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.elevation, 3.0);
expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
@@ -379,9 +379,9 @@
Material material = tester.widget<Material>(menuMaterial);
expect(opened, isEmpty);
- expect(material.color, themeData.colorScheme.surface);
+ expect(material.color, themeData.colorScheme.surfaceContainer);
expect(material.shadowColor, themeData.colorScheme.shadow);
- expect(material.surfaceTintColor, themeData.colorScheme.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.elevation, 3.0);
expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
@@ -409,9 +409,9 @@
.first;
material = tester.widget<Material>(menuMaterial);
- expect(material.color, themeData.colorScheme.surface);
+ expect(material.color, themeData.colorScheme.surfaceContainer);
expect(material.shadowColor, themeData.colorScheme.shadow);
- expect(material.surfaceTintColor, themeData.colorScheme.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.elevation, 3.0);
expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
diff --git a/packages/flutter/test/material/navigation_bar_test.dart b/packages/flutter/test/material/navigation_bar_test.dart
index 1abd469..1974e25 100644
--- a/packages/flutter/test/material/navigation_bar_test.dart
+++ b/packages/flutter/test/material/navigation_bar_test.dart
@@ -296,8 +296,8 @@
),
);
- expect(_getMaterial(tester).color, theme.colorScheme.surface);
- expect(_getMaterial(tester).surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(_getMaterial(tester).color, theme.colorScheme.surfaceContainer);
+ expect(_getMaterial(tester).surfaceTintColor, Colors.transparent);
expect(_getMaterial(tester).elevation, 3);
expect(tester.getSize(find.byType(NavigationBar)).height, 80);
expect(_getIndicatorDecoration(tester)?.color, theme.colorScheme.secondaryContainer);
diff --git a/packages/flutter/test/material/navigation_drawer_test.dart b/packages/flutter/test/material/navigation_drawer_test.dart
index 1d571af..849ce1f 100644
--- a/packages/flutter/test/material/navigation_drawer_test.dart
+++ b/packages/flutter/test/material/navigation_drawer_test.dart
@@ -181,8 +181,8 @@
await tester.pump(const Duration(seconds: 1));
// Test drawer Material.
- expect(_getMaterial(tester).color, theme.colorScheme.surface);
- expect(_getMaterial(tester).surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(_getMaterial(tester).color, theme.colorScheme.surfaceContainerLow);
+ expect(_getMaterial(tester).surfaceTintColor, Colors.transparent);
expect(_getMaterial(tester).shadowColor, Colors.transparent);
expect(_getMaterial(tester).elevation, 1);
// Test indicator decoration.
diff --git a/packages/flutter/test/material/navigation_rail_test.dart b/packages/flutter/test/material/navigation_rail_test.dart
index dd4e2ca..dea6254 100644
--- a/packages/flutter/test/material/navigation_rail_test.dart
+++ b/packages/flutter/test/material/navigation_rail_test.dart
@@ -79,7 +79,7 @@
),
);
- expect(_railMaterial(tester).color, equals(const Color(0xFFFFFBFE))); // default surface color in M3 colorScheme
+ expect(_railMaterial(tester).color, equals(const Color(0xfffef7ff))); // default surface color in M3 colorScheme
await _pumpNavigationRail(
tester,
diff --git a/packages/flutter/test/material/outlined_button_test.dart b/packages/flutter/test/material/outlined_button_test.dart
index 3bef05d..8fb9467 100644
--- a/packages/flutter/test/material/outlined_button_test.dart
+++ b/packages/flutter/test/material/outlined_button_test.dart
@@ -253,7 +253,7 @@
// Highlighted (pressed).
await gesture.down(center);
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -263,7 +263,7 @@
// Focused.
focusNode.requestFocus();
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
focusNode.dispose();
});
diff --git a/packages/flutter/test/material/outlined_button_theme_test.dart b/packages/flutter/test/material/outlined_button_theme_test.dart
index 93e1003..3d71ca4 100644
--- a/packages/flutter/test/material/outlined_button_theme_test.dart
+++ b/packages/flutter/test/material/outlined_button_theme_test.dart
@@ -185,8 +185,8 @@
expect(material.elevation, elevation);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, disabled), disabledMouseCursor);
- expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.04));
- expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.12));
+ expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.08));
+ expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.1));
expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null);
expect(material.shape, shape);
diff --git a/packages/flutter/test/material/popup_menu_theme_test.dart b/packages/flutter/test/material/popup_menu_theme_test.dart
index ccdf0cb..302e82c 100644
--- a/packages/flutter/test/material/popup_menu_theme_test.dart
+++ b/packages/flutter/test/material/popup_menu_theme_test.dart
@@ -189,9 +189,9 @@
matching: find.byType(Material),
).last,
);
- expect(button.color, theme.colorScheme.surface);
+ expect(button.color, theme.colorScheme.surfaceContainer);
expect(button.shadowColor, theme.colorScheme.shadow);
- expect(button.surfaceTintColor, theme.colorScheme.surfaceTint);
+ expect(button.surfaceTintColor, Colors.transparent);
expect(button.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0)));
expect(button.elevation, 3.0);
diff --git a/packages/flutter/test/material/radio_test.dart b/packages/flutter/test/material/radio_test.dart
index 33f1272..4ba8c47 100644
--- a/packages/flutter/test/material/radio_test.dart
+++ b/packages/flutter/test/material/radio_test.dart
@@ -1287,7 +1287,7 @@
expect(focusNode.hasPrimaryFocus, isTrue);
expect(
Material.of(tester.element(find.byKey(radioKey))),
- paints..rect()..circle(color: theme.colorScheme.primary.withOpacity(0.12))..circle(color: focusedFillColor),
+ paints..rect()..circle(color: theme.colorScheme.primary.withOpacity(0.1))..circle(color: focusedFillColor),
);
// Start hovering
@@ -1763,7 +1763,7 @@
expect(
Material.of(tester.element(find.byType(Radio<bool>))),
- paints..circle(color: colors.onSurface.withOpacity(0.12))
+ paints..circle(color: colors.onSurface.withOpacity(0.1))
..circle(color: colors.primary.withOpacity(1))
);
@@ -1774,7 +1774,7 @@
expect(
Material.of(tester.element(find.byType(Radio<bool>))),
- paints..circle(color: colors.primary.withOpacity(0.12))..circle(color: colors.onSurfaceVariant.withOpacity(1))
+ paints..circle(color: colors.primary.withOpacity(0.1))..circle(color: colors.onSurfaceVariant.withOpacity(1))
);
// selected radio in focused state
@@ -1785,7 +1785,7 @@
expect(
Material.of(tester.element(find.byType(Radio<bool>))),
- paints..circle(color: colors.primary.withOpacity(0.12))..circle(color: colors.primary.withOpacity(1))
+ paints..circle(color: colors.primary.withOpacity(0.1))..circle(color: colors.primary.withOpacity(1))
);
// unselected radio in focused state
@@ -1796,7 +1796,7 @@
expect(
Material.of(tester.element(find.byType(Radio<bool>))),
- paints..circle(color: colors.onSurface.withOpacity(0.12))..circle(color: colors.onSurface.withOpacity(1))
+ paints..circle(color: colors.onSurface.withOpacity(0.1))..circle(color: colors.onSurface.withOpacity(1))
);
// selected radio in hovered state
@@ -1962,7 +1962,7 @@
expect(getRadioMaterial(tester),
paints
- ..circle(color: theme.colorScheme.onSurface.withOpacity(0.12))
+ ..circle(color: theme.colorScheme.onSurface.withOpacity(0.1))
..circle(color: theme.colorScheme.primary)
);
// Remove pressed and hovered states
@@ -1977,7 +1977,7 @@
expect(getRadioMaterial(tester),
paints
- ..circle(color: theme.colorScheme.primary.withOpacity(0.12))
+ ..circle(color: theme.colorScheme.primary.withOpacity(0.1))
..circle(color: theme.colorScheme.primary)
);
focusNode.dispose();
diff --git a/packages/flutter/test/material/search_anchor_test.dart b/packages/flutter/test/material/search_anchor_test.dart
index 907ec36..759e466 100644
--- a/packages/flutter/test/material/search_anchor_test.dart
+++ b/packages/flutter/test/material/search_anchor_test.dart
@@ -1128,8 +1128,8 @@
await tester.pumpAndSettle();
final Material material = getSearchViewMaterial(tester);
expect(material.elevation, 6.0);
- expect(material.color, colorScheme.surface);
- expect(material.surfaceTintColor, colorScheme.surfaceTint);
+ expect(material.color, colorScheme.surfaceContainerHigh);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.clipBehavior, Clip.antiAlias);
final Finder findDivider = find.byType(Divider);
@@ -2684,7 +2684,7 @@
// Test the search view background color.
Material material = getSearchViewMaterial(tester);
- expect(material.color, theme.colorScheme.surface);
+ expect(material.color, theme.colorScheme.surfaceContainerHigh);
// Change the theme brightness.
theme = ThemeData(brightness: Brightness.dark);
@@ -2693,7 +2693,7 @@
// Test the search view background color.
material = getSearchViewMaterial(tester);
- expect(material.color, theme.colorScheme.surface);
+ expect(material.color, theme.colorScheme.surfaceContainerHigh);
});
testWidgets('Search view widgets can inherit local themes', (WidgetTester tester) async {
@@ -2744,7 +2744,7 @@
// Test the search view background color.
final Material searchViewMaterial = getSearchViewMaterial(tester);
- expect(searchViewMaterial.color, localTheme.colorScheme.surface);
+ expect(searchViewMaterial.color, localTheme.colorScheme.surfaceContainerHigh);
// Test the search view icons background color.
final Material iconButtonMaterial = tester.widget<Material>(find.descendant(
@@ -3096,10 +3096,10 @@
expect(material.borderOnForeground, true);
expect(material.borderRadius, null);
expect(material.clipBehavior, Clip.none);
- expect(material.color, colorScheme.surface);
+ expect(material.color, colorScheme.surfaceContainerHigh);
expect(material.elevation, 6.0);
expect(material.shadowColor, colorScheme.shadow);
- expect(material.surfaceTintColor, colorScheme.surfaceTint);
+ expect(material.surfaceTintColor, Colors.transparent);
expect(material.shape, const StadiumBorder());
final Text helperText = tester.widget(find.text('hint text'));
diff --git a/packages/flutter/test/material/segmented_button_test.dart b/packages/flutter/test/material/segmented_button_test.dart
index ce4dda4..0fc3cad 100644
--- a/packages/flutter/test/material/segmented_button_test.dart
+++ b/packages/flutter/test/material/segmented_button_test.dart
@@ -606,7 +606,7 @@
// Highlighted (pressed).
await gesture.down(center);
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.1)));
expect(material.textStyle?.color, theme.colorScheme.onSurface);
});
diff --git a/packages/flutter/test/material/slider_test.dart b/packages/flutter/test/material/slider_test.dart
index f422c04..34c5002 100644
--- a/packages/flutter/test/material/slider_test.dart
+++ b/packages/flutter/test/material/slider_test.dart
@@ -1707,11 +1707,11 @@
semantics.dispose();
});
- testWidgets('Slider is focusable and has correct focus color', (WidgetTester tester) async {
+ testWidgets('Material3 - Slider is focusable and has correct focus color', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(debugLabel: 'Slider');
addTearDown(focusNode.dispose);
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
- final ThemeData theme = ThemeData(useMaterial3: true);
+ final ThemeData theme = ThemeData();
double value = 0.5;
Widget buildApp({bool enabled = true}) {
return MaterialApp(
@@ -1743,7 +1743,7 @@
expect(focusNode.hasPrimaryFocus, isTrue);
expect(
Material.of(tester.element(find.byType(Slider))),
- paints..circle(color: theme.colorScheme.primary.withOpacity(0.12)),
+ paints..circle(color: theme.colorScheme.primary.withOpacity(0.1)),
);
// Check that the overlay does not show when unfocused and disabled.
@@ -1752,7 +1752,7 @@
expect(focusNode.hasPrimaryFocus, isFalse);
expect(
Material.of(tester.element(find.byType(Slider))),
- isNot(paints..circle(color: theme.colorScheme.primary.withOpacity(0.12))),
+ isNot(paints..circle(color: theme.colorScheme.primary.withOpacity(0.1))),
);
});
@@ -1941,10 +1941,10 @@
);
});
- testWidgets('Slider is draggable and has correct dragged color', (WidgetTester tester) async {
+ testWidgets('Material3 - Slider is draggable and has correct dragged color', (WidgetTester tester) async {
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
double value = 0.5;
- final ThemeData theme = ThemeData(useMaterial3: true);
+ final ThemeData theme = ThemeData();
final Key sliderKey = UniqueKey();
final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);
@@ -1978,7 +1978,7 @@
await tester.pumpAndSettle();
expect(
Material.of(tester.element(find.byType(Slider))),
- isNot(paints..circle(color: theme.colorScheme.primary.withOpacity(0.12))),
+ isNot(paints..circle(color: theme.colorScheme.primary.withOpacity(0.1))),
);
// Start dragging.
@@ -1992,7 +1992,7 @@
// Slider has overlay when enabled and dragged.
expect(
Material.of(tester.element(find.byType(Slider))),
- paints..circle(color: theme.colorScheme.primary.withOpacity(0.12)),
+ paints..circle(color: theme.colorScheme.primary.withOpacity(0.1)),
);
await drag.up();
@@ -2002,7 +2002,7 @@
expect(focusNode.hasFocus, false);
expect(
Material.of(tester.element(find.byType(Slider))),
- isNot(paints..circle(color: theme.colorScheme.primary.withOpacity(0.12))),
+ isNot(paints..circle(color: theme.colorScheme.primary.withOpacity(0.1))),
);
// Slider has overlay when enabled, dragged and focused.
@@ -2012,7 +2012,7 @@
expect(focusNode.hasFocus, true);
expect(
Material.of(tester.element(find.byType(Slider))),
- paints..circle(color: theme.colorScheme.primary.withOpacity(0.12)),
+ paints..circle(color: theme.colorScheme.primary.withOpacity(0.1)),
);
});
@@ -3859,14 +3859,15 @@
);
});
- testWidgets('Slider is focusable and has correct focus color', (WidgetTester tester) async {
+ testWidgets('Material2 - Slider is focusable and has correct focus color', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(debugLabel: 'Slider');
addTearDown(focusNode.dispose);
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
- final ThemeData theme = ThemeData();
+ final ThemeData theme = ThemeData(useMaterial3: false);
double value = 0.5;
Widget buildApp({bool enabled = true}) {
return MaterialApp(
+ theme: theme,
home: Material(
child: Center(
child: StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
@@ -3907,16 +3908,17 @@
);
});
- testWidgets('Slider is draggable and has correct dragged color', (WidgetTester tester) async {
+ testWidgets('Material2 - Slider is draggable and has correct dragged color', (WidgetTester tester) async {
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
double value = 0.5;
- final ThemeData theme = ThemeData();
+ final ThemeData theme = ThemeData(useMaterial3: false);
final Key sliderKey = UniqueKey();
final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);
Widget buildApp({bool enabled = true}) {
return MaterialApp(
+ theme: theme,
home: Material(
child: Center(
child: StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
diff --git a/packages/flutter/test/material/slider_theme_test.dart b/packages/flutter/test/material/slider_theme_test.dart
index d389b98..ee191ca 100644
--- a/packages/flutter/test/material/slider_theme_test.dart
+++ b/packages/flutter/test/material/slider_theme_test.dart
@@ -110,7 +110,7 @@
final ColorScheme colorScheme = theme.colorScheme;
const double trackHeight = 4.0;
final Color activeTrackColor = Color(colorScheme.primary.value);
- final Color inactiveTrackColor = colorScheme.surfaceVariant;
+ final Color inactiveTrackColor = colorScheme.surfaceContainerHighest;
final Color secondaryActiveTrackColor = colorScheme.primary.withOpacity(0.54);
final Color disabledActiveTrackColor = colorScheme.onSurface.withOpacity(0.38);
final Color disabledInactiveTrackColor = colorScheme.onSurface.withOpacity(0.12);
@@ -2077,9 +2077,9 @@
expect(
valueIndicatorBox,
paints
- ..rrect(color: const Color(0xfffffbfe))
+ ..rrect(color: const Color(0xfffef7ff))
..rrect(color: const Color(0xff6750a4))
- ..rrect(color: const Color(0xffe7e0ec))
+ ..rrect(color: const Color(0xffe6e0e9))
..path(color: Color(theme.colorScheme.primary.value))
);
diff --git a/packages/flutter/test/material/switch_test.dart b/packages/flutter/test/material/switch_test.dart
index 596a749..3e690c1 100644
--- a/packages/flutter/test/material/switch_test.dart
+++ b/packages/flutter/test/material/switch_test.dart
@@ -495,7 +495,7 @@
..save()
..rrect(
style: PaintingStyle.fill,
- color: colors.surfaceVariant,
+ color: colors.surfaceContainerHighest,
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
..rrect(
@@ -560,7 +560,7 @@
..save()
..rrect(
style: PaintingStyle.fill,
- color: colors.surfaceVariant,
+ color: colors.surfaceContainerHighest,
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
..rrect(
@@ -680,7 +680,7 @@
..save()
..rrect(
style: PaintingStyle.fill,
- color: colors.surfaceVariant.withOpacity(0.12),
+ color: colors.surfaceContainerHighest.withOpacity(0.12),
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
..rrect(
@@ -800,7 +800,7 @@
await tester.pumpAndSettle();
expect(getSwitchMaterial(tester),
- paints..circle(color: theme.colorScheme.primary.withOpacity(0.12))
+ paints..circle(color: theme.colorScheme.primary.withOpacity(0.1))
);
// On both hovered and focused, the overlay color should show hovered overlay color.
@@ -1828,7 +1828,7 @@
paints
..rrect(
style: PaintingStyle.fill,
- color: colors.surfaceVariant,
+ color: colors.surfaceContainerHighest,
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
..rrect(
@@ -1849,7 +1849,7 @@
paints
..rrect(
style: PaintingStyle.fill,
- color: colors.surfaceVariant.withOpacity(0.12),
+ color: colors.surfaceContainerHighest.withOpacity(0.12),
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
..rrect(
@@ -2392,7 +2392,7 @@
paints
..rrect(
style: PaintingStyle.fill,
- color: colors.surfaceVariant.withOpacity(0.12),
+ color: colors.surfaceContainerHighest.withOpacity(0.12),
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
..rrect(
@@ -2428,7 +2428,7 @@
paints
..rrect(
style: PaintingStyle.fill,
- color: colors.surfaceVariant,
+ color: colors.surfaceContainerHighest,
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
..rrect()
@@ -2582,7 +2582,7 @@
color: colors.primary,
rrect: RRect.fromLTRBR(4.0, 8.0, 56.0, 40.0, const Radius.circular(16.0)),
)
- ..circle(color: colors.primary.withOpacity(0.12))
+ ..circle(color: colors.primary.withOpacity(0.1))
..rrect(color: focusedThumbColor),
reason: 'active enabled switch should default track and custom thumb color',
);
@@ -3568,7 +3568,7 @@
expect(Material.of(tester.element(find.byType(Switch))),
paints..rrect(
- color: colors.surfaceVariant, // track color
+ color: colors.surfaceContainerHighest, // track color
style: PaintingStyle.fill
)..rrect(
color: colors.outline, // track outline color
@@ -3598,7 +3598,7 @@
expect(Material.of(tester.element(find.byType(Switch))),
paints..rrect(
- color: colors.surfaceVariant.withOpacity(0.12), // track color
+ color: colors.surfaceContainerHighest.withOpacity(0.12), // track color
style: PaintingStyle.fill,
)..rrect(
color: colors.onSurface.withOpacity(0.12), // track outline color
diff --git a/packages/flutter/test/material/tab_bar_theme_test.dart b/packages/flutter/test/material/tab_bar_theme_test.dart
index dcb4fbf..103c521 100644
--- a/packages/flutter/test/material/tab_bar_theme_test.dart
+++ b/packages/flutter/test/material/tab_bar_theme_test.dart
@@ -153,7 +153,7 @@
tabBarBox,
paints
..line(
- color: theme.colorScheme.surfaceVariant,
+ color: theme.colorScheme.outlineVariant,
strokeWidth: 1.0,
)
..rrect(color: theme.colorScheme.primary),
@@ -209,7 +209,7 @@
tabBarBox,
paints
..line(
- color: theme.colorScheme.surfaceVariant,
+ color: theme.colorScheme.outlineVariant,
strokeWidth: 1.0,
)
..line(color: theme.colorScheme.primary),
@@ -637,7 +637,7 @@
paints
// Divider.
..line(
- color: theme.colorScheme.surfaceVariant,
+ color: theme.colorScheme.outlineVariant,
strokeWidth: 1.0,
)
// Tab indicator.
@@ -691,7 +691,7 @@
paints
// Divider.
..line(
- color: theme.colorScheme.surfaceVariant,
+ color: theme.colorScheme.outlineVariant,
strokeWidth: 1.0,
)
// Tab indicator
diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart
index 374758f..79b8aee 100644
--- a/packages/flutter/test/material/tabs_test.dart
+++ b/packages/flutter/test/material/tabs_test.dart
@@ -266,7 +266,7 @@
await tester.pumpWidget(
MaterialApp(theme: theme, home: Material(child: tabBar)),
);
- expect(find.byType(TabBar), paints..line(color: material3 ? theme.colorScheme.surfaceVariant : Colors.blue[500]));
+ expect(find.byType(TabBar), paints..line(color: material3 ? theme.colorScheme.outlineVariant : Colors.blue[500]));
});
testWidgets('Tab color - match', (WidgetTester tester) async {
@@ -276,7 +276,7 @@
await tester.pumpWidget(
MaterialApp(theme: theme, home: Material(color: const Color(0xff2196f3), child: tabBar)),
);
- expect(find.byType(TabBar), paints..line(color: material3 ? theme.colorScheme.surfaceVariant : Colors.white));
+ expect(find.byType(TabBar), paints..line(color: material3 ? theme.colorScheme.outlineVariant : Colors.white));
});
testWidgets('Tab color - transparency', (WidgetTester tester) async {
@@ -286,7 +286,7 @@
await tester.pumpWidget(
MaterialApp(theme: theme, home: Material(type: MaterialType.transparency, child: tabBar)),
);
- expect(find.byType(TabBar), paints..line(color: material3 ? theme.colorScheme.surfaceVariant : Colors.blue[500]));
+ expect(find.byType(TabBar), paints..line(color: material3 ? theme.colorScheme.outlineVariant : Colors.blue[500]));
});
testWidgets('TabBar default selected/unselected label style (primary)', (WidgetTester tester) async {
@@ -429,7 +429,7 @@
paints
// Divider
..line(
- color: theme.colorScheme.surfaceVariant,
+ color: theme.colorScheme.outlineVariant,
)
// Tab indicator
..line(
@@ -463,7 +463,7 @@
await gesture.down(tester.getCenter(find.text(selectedValue)));
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
await gesture.up();
await tester.pumpAndSettle();
@@ -473,7 +473,7 @@
await gesture.down(tester.getCenter(find.text(selectedValue)));
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
await gesture.up();
await tester.pumpAndSettle();
});
@@ -500,7 +500,7 @@
await gesture.down(tester.getCenter(find.text(selectedValue)));
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.1)));
await gesture.up();
await tester.pumpAndSettle();
@@ -510,7 +510,7 @@
await gesture.down(tester.getCenter(find.text(selectedValue)));
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.onSurface.withOpacity(0.1)));
});
testWidgets('TabBar tap selects tab', (WidgetTester tester) async {
@@ -4227,7 +4227,7 @@
await tester.pumpWidget(buildLeftRightApp(themeData: theme, tabs: tabs, value: 'LEFT'));
final RenderBox tabBarBox = tester.firstRenderObject<RenderBox>(find.byType(TabBar));
expect(tabBarBox, paints..line(
- color: material3 ? theme.colorScheme.surfaceVariant : Colors.white,
+ color: material3 ? theme.colorScheme.outlineVariant : Colors.white,
));
});
@@ -4239,7 +4239,7 @@
await tester.pumpWidget(buildLeftRightApp(themeData: theme, tabs: tabs, value: 'LEFT', automaticIndicatorColorAdjustment: false));
final RenderBox tabBarBox = tester.firstRenderObject<RenderBox>(find.byType(TabBar));
expect(tabBarBox, paints..line(
- color: material3 ? theme.colorScheme.surfaceVariant : const Color(0xff2196f3),
+ color: material3 ? theme.colorScheme.outlineVariant : const Color(0xff2196f3),
));
});
@@ -6076,14 +6076,14 @@
inkFeatures,
isNot(paints
..rect(
- color: theme.colorScheme.onSurface.withOpacity(0.12),
+ color: theme.colorScheme.onSurface.withOpacity(0.1),
))
);
expect(
inkFeatures,
isNot(paints
..rect(
- color: theme.colorScheme.primary.withOpacity(0.12),
+ color: theme.colorScheme.primary.withOpacity(0.1),
))
);
@@ -6094,7 +6094,7 @@
inkFeatures,
paints
..rect(
- color: theme.colorScheme.onSurface.withOpacity(0.12),
+ color: theme.colorScheme.onSurface.withOpacity(0.1),
),
);
@@ -6105,7 +6105,7 @@
inkFeatures,
paints
..rect(
- color: theme.colorScheme.primary.withOpacity(0.12),
+ color: theme.colorScheme.primary.withOpacity(0.1),
),
);
});
@@ -6125,7 +6125,7 @@
inkFeatures,
isNot(paints
..rect(
- color: theme.colorScheme.primary.withOpacity(0.12),
+ color: theme.colorScheme.primary.withOpacity(0.1),
))
);
@@ -6136,7 +6136,7 @@
inkFeatures,
paints
..rect(
- color: theme.colorScheme.primary.withOpacity(0.12),
+ color: theme.colorScheme.primary.withOpacity(0.1),
),
);
@@ -6151,7 +6151,7 @@
inkFeatures,
paints
..rect(
- color: theme.colorScheme.primary.withOpacity(0.12),
+ color: theme.colorScheme.primary.withOpacity(0.1),
),
);
});
diff --git a/packages/flutter/test/material/text_button_test.dart b/packages/flutter/test/material/text_button_test.dart
index 6d7e3e8..dad9b27 100644
--- a/packages/flutter/test/material/text_button_test.dart
+++ b/packages/flutter/test/material/text_button_test.dart
@@ -350,7 +350,7 @@
// Highlighted (pressed).
await gesture.down(center);
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect()..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
// Remove pressed and hovered states
await gesture.up();
await tester.pumpAndSettle();
@@ -360,7 +360,7 @@
// Focused.
focusNode.requestFocus();
await tester.pumpAndSettle();
- expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
+ expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.1)));
focusNode.dispose();
});
diff --git a/packages/flutter/test/material/text_button_theme_test.dart b/packages/flutter/test/material/text_button_theme_test.dart
index c80ee7a..298feba 100644
--- a/packages/flutter/test/material/text_button_theme_test.dart
+++ b/packages/flutter/test/material/text_button_theme_test.dart
@@ -187,8 +187,8 @@
expect(material.elevation, elevation);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, enabled), enabledMouseCursor);
expect(MaterialStateProperty.resolveAs<MouseCursor?>(inkWell.mouseCursor, disabled), disabledMouseCursor);
- expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.04));
- expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.12));
+ expect(inkWell.overlayColor!.resolve(hovered), foregroundColor.withOpacity(0.08));
+ expect(inkWell.overlayColor!.resolve(focused), foregroundColor.withOpacity(0.1));
expect(inkWell.enableFeedback, enableFeedback);
expect(material.borderRadius, null);
expect(material.shape, shape);
diff --git a/packages/flutter/test/material/theme_data_test.dart b/packages/flutter/test/material/theme_data_test.dart
index 336d90b..65d1037 100644
--- a/packages/flutter/test/material/theme_data_test.dart
+++ b/packages/flutter/test/material/theme_data_test.dart
@@ -138,34 +138,55 @@
test('ThemeData can generate a light colorScheme from colorSchemeSeed', () {
final ThemeData theme = ThemeData(colorSchemeSeed: Colors.blue);
- expect(theme.colorScheme.primary, const Color(0xff0061a4));
+ expect(theme.colorScheme.primary, const Color(0xff36618e));
expect(theme.colorScheme.onPrimary, const Color(0xffffffff));
expect(theme.colorScheme.primaryContainer, const Color(0xffd1e4ff));
expect(theme.colorScheme.onPrimaryContainer, const Color(0xff001d36));
+ expect(theme.colorScheme.primaryFixed, const Color(0xffd1e4ff));
+ expect(theme.colorScheme.primaryFixedDim, const Color(0xffa0cafd));
+ expect(theme.colorScheme.onPrimaryFixed, const Color(0xff001d36));
+ expect(theme.colorScheme.onPrimaryFixedVariant, const Color(0xff194975));
expect(theme.colorScheme.secondary, const Color(0xff535f70));
expect(theme.colorScheme.onSecondary, const Color(0xffffffff));
expect(theme.colorScheme.secondaryContainer, const Color(0xffd7e3f7));
expect(theme.colorScheme.onSecondaryContainer, const Color(0xff101c2b));
+ expect(theme.colorScheme.secondaryFixed, const Color(0xffd7e3f7));
+ expect(theme.colorScheme.secondaryFixedDim, const Color(0xffbbc7db));
+ expect(theme.colorScheme.onSecondaryFixed, const Color(0xff101c2b));
+ expect(theme.colorScheme.onSecondaryFixedVariant, const Color(0xff3b4858));
expect(theme.colorScheme.tertiary, const Color(0xff6b5778));
expect(theme.colorScheme.onTertiary, const Color(0xffffffff));
expect(theme.colorScheme.tertiaryContainer, const Color(0xfff2daff));
expect(theme.colorScheme.onTertiaryContainer, const Color(0xff251431));
+ expect(theme.colorScheme.tertiaryFixed, const Color(0xfff2daff));
+ expect(theme.colorScheme.tertiaryFixedDim, const Color(0xffd6bee4));
+ expect(theme.colorScheme.onTertiaryFixed, const Color(0xff251431));
+ expect(theme.colorScheme.onTertiaryFixedVariant, const Color(0xff523f5f));
expect(theme.colorScheme.error, const Color(0xffba1a1a));
expect(theme.colorScheme.onError, const Color(0xffffffff));
expect(theme.colorScheme.errorContainer, const Color(0xffffdad6));
expect(theme.colorScheme.onErrorContainer, const Color(0xff410002));
expect(theme.colorScheme.outline, const Color(0xff73777f));
- expect(theme.colorScheme.background, const Color(0xfffdfcff));
- expect(theme.colorScheme.onBackground, const Color(0xff1a1c1e));
- expect(theme.colorScheme.surface, const Color(0xfffdfcff));
- expect(theme.colorScheme.onSurface, const Color(0xff1a1c1e));
+ expect(theme.colorScheme.outlineVariant, const Color(0xffc3c7cf));
+ expect(theme.colorScheme.background, const Color(0xfff8f9ff));
+ expect(theme.colorScheme.onBackground, const Color(0xff191c20));
+ expect(theme.colorScheme.surface, const Color(0xfff8f9ff));
+ expect(theme.colorScheme.surfaceBright, const Color(0xfff8f9ff));
+ expect(theme.colorScheme.surfaceDim, const Color(0xffd8dae0));
+ expect(theme.colorScheme.surfaceContainerLowest, const Color(0xffffffff));
+ expect(theme.colorScheme.surfaceContainerLow, const Color(0xfff2f3fa));
+ expect(theme.colorScheme.surfaceContainer, const Color(0xffeceef4));
+ expect(theme.colorScheme.surfaceContainerHigh, const Color(0xffe6e8ee));
+ expect(theme.colorScheme.surfaceContainerHighest, const Color(0xffe1e2e8));
+ expect(theme.colorScheme.onSurface, const Color(0xff191c20));
expect(theme.colorScheme.surfaceVariant, const Color(0xffdfe2eb));
expect(theme.colorScheme.onSurfaceVariant, const Color(0xff43474e));
- expect(theme.colorScheme.inverseSurface, const Color(0xff2f3033));
- expect(theme.colorScheme.onInverseSurface, const Color(0xfff1f0f4));
- expect(theme.colorScheme.inversePrimary, const Color(0xff9ecaff));
+ expect(theme.colorScheme.inverseSurface, const Color(0xff2e3135));
+ expect(theme.colorScheme.onInverseSurface, const Color(0xffeff0f7));
+ expect(theme.colorScheme.inversePrimary, const Color(0xffa0cafd));
expect(theme.colorScheme.shadow, const Color(0xff000000));
- expect(theme.colorScheme.surfaceTint, const Color(0xff0061a4));
+ expect(theme.colorScheme.scrim, const Color(0xff000000));
+ expect(theme.colorScheme.surfaceTint, const Color(0xff36618e));
expect(theme.colorScheme.brightness, Brightness.light);
expect(theme.primaryColor, theme.colorScheme.primary);
@@ -186,34 +207,55 @@
brightness: Brightness.dark,
);
- expect(theme.colorScheme.primary, const Color(0xff9ecaff));
+ expect(theme.colorScheme.primary, const Color(0xffa0cafd));
expect(theme.colorScheme.onPrimary, const Color(0xff003258));
- expect(theme.colorScheme.primaryContainer, const Color(0xff00497d));
+ expect(theme.colorScheme.primaryContainer, const Color(0xff194975));
expect(theme.colorScheme.onPrimaryContainer, const Color(0xffd1e4ff));
+ expect(theme.colorScheme.primaryFixed, const Color(0xffd1e4ff));
+ expect(theme.colorScheme.primaryFixedDim, const Color(0xffa0cafd));
+ expect(theme.colorScheme.onPrimaryFixed, const Color(0xff001d36));
+ expect(theme.colorScheme.onPrimaryFixedVariant, const Color(0xff194975));
expect(theme.colorScheme.secondary, const Color(0xffbbc7db));
expect(theme.colorScheme.onSecondary, const Color(0xff253140));
expect(theme.colorScheme.secondaryContainer, const Color(0xff3b4858));
expect(theme.colorScheme.onSecondaryContainer, const Color(0xffd7e3f7));
+ expect(theme.colorScheme.secondaryFixed, const Color(0xffd7e3f7));
+ expect(theme.colorScheme.secondaryFixedDim, const Color(0xffbbc7db));
+ expect(theme.colorScheme.onSecondaryFixed, const Color(0xff101c2b));
+ expect(theme.colorScheme.onSecondaryFixedVariant, const Color(0xff3b4858));
expect(theme.colorScheme.tertiary, const Color(0xffd6bee4));
expect(theme.colorScheme.onTertiary, const Color(0xff3b2948));
expect(theme.colorScheme.tertiaryContainer, const Color(0xff523f5f));
expect(theme.colorScheme.onTertiaryContainer, const Color(0xfff2daff));
+ expect(theme.colorScheme.tertiaryFixed, const Color(0xfff2daff));
+ expect(theme.colorScheme.tertiaryFixedDim, const Color(0xffd6bee4));
+ expect(theme.colorScheme.onTertiaryFixed, const Color(0xff251431));
+ expect(theme.colorScheme.onTertiaryFixedVariant, const Color(0xff523f5f));
expect(theme.colorScheme.error, const Color(0xffffb4ab));
expect(theme.colorScheme.onError, const Color(0xff690005));
expect(theme.colorScheme.errorContainer, const Color(0xff93000a));
- expect(theme.colorScheme.onErrorContainer, const Color(0xffffb4ab));
+ expect(theme.colorScheme.onErrorContainer, const Color(0xffffdad6));
expect(theme.colorScheme.outline, const Color(0xff8d9199));
- expect(theme.colorScheme.background, const Color(0xff1a1c1e));
- expect(theme.colorScheme.onBackground, const Color(0xffe2e2e6));
- expect(theme.colorScheme.surface, const Color(0xff1a1c1e));
- expect(theme.colorScheme.onSurface, const Color(0xffe2e2e6));
+ expect(theme.colorScheme.outlineVariant, const Color(0xff43474e));
+ expect(theme.colorScheme.background, const Color(0xff111418));
+ expect(theme.colorScheme.onBackground, const Color(0xffe1e2e8));
+ expect(theme.colorScheme.surface, const Color(0xff111418));
+ expect(theme.colorScheme.surfaceDim, const Color(0xff111418));
+ expect(theme.colorScheme.surfaceBright, const Color(0xff36393e));
+ expect(theme.colorScheme.surfaceContainerLowest, const Color(0xff0b0e13));
+ expect(theme.colorScheme.surfaceContainerLow, const Color(0xff191c20));
+ expect(theme.colorScheme.surfaceContainer, const Color(0xff1d2024));
+ expect(theme.colorScheme.surfaceContainerHigh, const Color(0xff272a2f));
+ expect(theme.colorScheme.surfaceContainerHighest, const Color(0xff32353a));
+ expect(theme.colorScheme.onSurface, const Color(0xffe1e2e8));
expect(theme.colorScheme.surfaceVariant, const Color(0xff43474e));
expect(theme.colorScheme.onSurfaceVariant, const Color(0xffc3c7cf));
- expect(theme.colorScheme.inverseSurface, const Color(0xffe2e2e6));
- expect(theme.colorScheme.onInverseSurface, const Color(0xff2f3033));
- expect(theme.colorScheme.inversePrimary, const Color(0xff0061a4));
+ expect(theme.colorScheme.inverseSurface, const Color(0xffe1e2e8));
+ expect(theme.colorScheme.onInverseSurface, const Color(0xff2e3135));
+ expect(theme.colorScheme.inversePrimary, const Color(0xff36618e));
expect(theme.colorScheme.shadow, const Color(0xff000000));
- expect(theme.colorScheme.surfaceTint, const Color(0xff9ecaff));
+ expect(theme.colorScheme.scrim, const Color(0xff000000));
+ expect(theme.colorScheme.surfaceTint, const Color(0xffa0cafd));
expect(theme.colorScheme.brightness, Brightness.dark);
expect(theme.primaryColor, theme.colorScheme.surface);
@@ -231,34 +273,53 @@
test('ThemeData can generate a default M3 light colorScheme when useMaterial3 is true', () {
final ThemeData theme = ThemeData(useMaterial3: true);
- expect(theme.colorScheme.primary, const Color(0xFF6750A4));
- expect(theme.colorScheme.onPrimary, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.primaryContainer, const Color(0xFFEADDFF));
- expect(theme.colorScheme.onPrimaryContainer, const Color(0xFF21005D));
- expect(theme.colorScheme.secondary, const Color(0xFF625B71));
- expect(theme.colorScheme.onSecondary, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.secondaryContainer, const Color(0xFFE8DEF8));
- expect(theme.colorScheme.onSecondaryContainer, const Color(0xFF1D192B));
- expect(theme.colorScheme.tertiary, const Color(0xFF7D5260));
- expect(theme.colorScheme.onTertiary, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.tertiaryContainer, const Color(0xFFFFD8E4));
- expect(theme.colorScheme.onTertiaryContainer, const Color(0xFF31111D));
- expect(theme.colorScheme.error, const Color(0xFFB3261E));
- expect(theme.colorScheme.onError, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.errorContainer, const Color(0xFFF9DEDC));
- expect(theme.colorScheme.onErrorContainer, const Color(0xFF410E0B));
- expect(theme.colorScheme.outline, const Color(0xFF79747E));
- expect(theme.colorScheme.background, const Color(0xFFFFFBFE));
- expect(theme.colorScheme.onBackground, const Color(0xFF1C1B1F));
- expect(theme.colorScheme.surface, const Color(0xFFFFFBFE));
- expect(theme.colorScheme.onSurface, const Color(0xFF1C1B1F));
- expect(theme.colorScheme.surfaceVariant, const Color(0xFFE7E0EC));
- expect(theme.colorScheme.onSurfaceVariant, const Color(0xFF49454F));
- expect(theme.colorScheme.inverseSurface, const Color(0xFF313033));
- expect(theme.colorScheme.onInverseSurface, const Color(0xFFF4EFF4));
- expect(theme.colorScheme.inversePrimary, const Color(0xFFD0BCFF));
- expect(theme.colorScheme.shadow, const Color(0xFF000000));
- expect(theme.colorScheme.surfaceTint, const Color(0xFF6750A4));
+ expect(theme.colorScheme.primary, const Color(0xff6750a4));
+ expect(theme.colorScheme.onPrimary, const Color(0xffffffff));
+ expect(theme.colorScheme.primaryContainer, const Color(0xffeaddff));
+ expect(theme.colorScheme.onPrimaryContainer, const Color(0xff21005d));
+ expect(theme.colorScheme.primaryFixed, const Color(0xffeaddff));
+ expect(theme.colorScheme.primaryFixedDim, const Color(0xffd0bcff));
+ expect(theme.colorScheme.onPrimaryFixed, const Color(0xff21005d));
+ expect(theme.colorScheme.onPrimaryFixedVariant, const Color(0xff4f378b));
+ expect(theme.colorScheme.secondary, const Color(0xff625b71));
+ expect(theme.colorScheme.onSecondary, const Color(0xffffffff));
+ expect(theme.colorScheme.secondaryContainer, const Color(0xffe8def8));
+ expect(theme.colorScheme.onSecondaryContainer, const Color(0xff1d192b));
+ expect(theme.colorScheme.secondaryFixed, const Color(0xffe8def8));
+ expect(theme.colorScheme.secondaryFixedDim, const Color(0xffccc2dc));
+ expect(theme.colorScheme.onSecondaryFixed, const Color(0xff1d192b));
+ expect(theme.colorScheme.onSecondaryFixedVariant, const Color(0xff4a4458));
+ expect(theme.colorScheme.tertiary, const Color(0xff7d5260));
+ expect(theme.colorScheme.onTertiary, const Color(0xffffffff));
+ expect(theme.colorScheme.tertiaryContainer, const Color(0xffffd8e4));
+ expect(theme.colorScheme.onTertiaryContainer, const Color(0xff31111d));
+ expect(theme.colorScheme.tertiaryFixed, const Color(0xffffd8e4));
+ expect(theme.colorScheme.tertiaryFixedDim, const Color(0xffefb8c8));
+ expect(theme.colorScheme.onTertiaryFixed, const Color(0xff31111d));
+ expect(theme.colorScheme.onTertiaryFixedVariant, const Color(0xff633b48));
+ expect(theme.colorScheme.error, const Color(0xffb3261e));
+ expect(theme.colorScheme.onError, const Color(0xffffffff));
+ expect(theme.colorScheme.errorContainer, const Color(0xfff9dedc));
+ expect(theme.colorScheme.onErrorContainer, const Color(0xff410e0b));
+ expect(theme.colorScheme.outline, const Color(0xff79747e));
+ expect(theme.colorScheme.background, const Color(0xfffef7ff));
+ expect(theme.colorScheme.onBackground, const Color(0xff1d1b20));
+ expect(theme.colorScheme.surface, const Color(0xfffef7ff));
+ expect(theme.colorScheme.onSurface, const Color(0xff1d1b20));
+ expect(theme.colorScheme.surfaceVariant, const Color(0xffe7e0ec));
+ expect(theme.colorScheme.onSurfaceVariant, const Color(0xff49454f));
+ expect(theme.colorScheme.surfaceBright, const Color(0xfffef7ff));
+ expect(theme.colorScheme.surfaceDim, const Color(0xffded8e1));
+ expect(theme.colorScheme.surfaceContainer, const Color(0xfff3edf7));
+ expect(theme.colorScheme.surfaceContainerHighest, const Color(0xffe6e0e9));
+ expect(theme.colorScheme.surfaceContainerHigh, const Color(0xffece6f0));
+ expect(theme.colorScheme.surfaceContainerLowest, const Color(0xffffffff));
+ expect(theme.colorScheme.surfaceContainerLow, const Color(0xfff7f2fa));
+ expect(theme.colorScheme.inverseSurface, const Color(0xff322f35));
+ expect(theme.colorScheme.onInverseSurface, const Color(0xfff5eff7));
+ expect(theme.colorScheme.inversePrimary, const Color(0xffd0bcff));
+ expect(theme.colorScheme.shadow, const Color(0xff000000));
+ expect(theme.colorScheme.surfaceTint, const Color(0xff6750a4));
expect(theme.colorScheme.brightness, Brightness.light);
expect(theme.primaryColor, theme.colorScheme.primary);
@@ -277,34 +338,53 @@
test('ThemeData.light() can generate a default M3 light colorScheme when useMaterial3 is true', () {
final ThemeData theme = ThemeData.light(useMaterial3: true);
- expect(theme.colorScheme.primary, const Color(0xFF6750A4));
- expect(theme.colorScheme.onPrimary, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.primaryContainer, const Color(0xFFEADDFF));
- expect(theme.colorScheme.onPrimaryContainer, const Color(0xFF21005D));
- expect(theme.colorScheme.secondary, const Color(0xFF625B71));
- expect(theme.colorScheme.onSecondary, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.secondaryContainer, const Color(0xFFE8DEF8));
- expect(theme.colorScheme.onSecondaryContainer, const Color(0xFF1D192B));
- expect(theme.colorScheme.tertiary, const Color(0xFF7D5260));
- expect(theme.colorScheme.onTertiary, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.tertiaryContainer, const Color(0xFFFFD8E4));
- expect(theme.colorScheme.onTertiaryContainer, const Color(0xFF31111D));
- expect(theme.colorScheme.error, const Color(0xFFB3261E));
- expect(theme.colorScheme.onError, const Color(0xFFFFFFFF));
- expect(theme.colorScheme.errorContainer, const Color(0xFFF9DEDC));
- expect(theme.colorScheme.onErrorContainer, const Color(0xFF410E0B));
- expect(theme.colorScheme.outline, const Color(0xFF79747E));
- expect(theme.colorScheme.background, const Color(0xFFFFFBFE));
- expect(theme.colorScheme.onBackground, const Color(0xFF1C1B1F));
- expect(theme.colorScheme.surface, const Color(0xFFFFFBFE));
- expect(theme.colorScheme.onSurface, const Color(0xFF1C1B1F));
- expect(theme.colorScheme.surfaceVariant, const Color(0xFFE7E0EC));
- expect(theme.colorScheme.onSurfaceVariant, const Color(0xFF49454F));
- expect(theme.colorScheme.inverseSurface, const Color(0xFF313033));
- expect(theme.colorScheme.onInverseSurface, const Color(0xFFF4EFF4));
- expect(theme.colorScheme.inversePrimary, const Color(0xFFD0BCFF));
- expect(theme.colorScheme.shadow, const Color(0xFF000000));
- expect(theme.colorScheme.surfaceTint, const Color(0xFF6750A4));
+ expect(theme.colorScheme.primary, const Color(0xff6750a4));
+ expect(theme.colorScheme.onPrimary, const Color(0xffffffff));
+ expect(theme.colorScheme.primaryContainer, const Color(0xffeaddff));
+ expect(theme.colorScheme.onPrimaryContainer, const Color(0xff21005d));
+ expect(theme.colorScheme.primaryFixed, const Color(0xffeaddff));
+ expect(theme.colorScheme.primaryFixedDim, const Color(0xffd0bcff));
+ expect(theme.colorScheme.onPrimaryFixed, const Color(0xff21005d));
+ expect(theme.colorScheme.onPrimaryFixedVariant, const Color(0xff4f378b));
+ expect(theme.colorScheme.secondary, const Color(0xff625b71));
+ expect(theme.colorScheme.onSecondary, const Color(0xffffffff));
+ expect(theme.colorScheme.secondaryContainer, const Color(0xffe8def8));
+ expect(theme.colorScheme.onSecondaryContainer, const Color(0xff1d192b));
+ expect(theme.colorScheme.secondaryFixed, const Color(0xffe8def8));
+ expect(theme.colorScheme.secondaryFixedDim, const Color(0xffccc2dc));
+ expect(theme.colorScheme.onSecondaryFixed, const Color(0xff1d192b));
+ expect(theme.colorScheme.onSecondaryFixedVariant, const Color(0xff4a4458));
+ expect(theme.colorScheme.tertiary, const Color(0xff7d5260));
+ expect(theme.colorScheme.onTertiary, const Color(0xffffffff));
+ expect(theme.colorScheme.tertiaryContainer, const Color(0xffffd8e4));
+ expect(theme.colorScheme.onTertiaryContainer, const Color(0xff31111d));
+ expect(theme.colorScheme.tertiaryFixed, const Color(0xffffd8e4));
+ expect(theme.colorScheme.tertiaryFixedDim, const Color(0xffefb8c8));
+ expect(theme.colorScheme.onTertiaryFixed, const Color(0xff31111d));
+ expect(theme.colorScheme.onTertiaryFixedVariant, const Color(0xff633b48));
+ expect(theme.colorScheme.error, const Color(0xffb3261e));
+ expect(theme.colorScheme.onError, const Color(0xffffffff));
+ expect(theme.colorScheme.errorContainer, const Color(0xfff9dedc));
+ expect(theme.colorScheme.onErrorContainer, const Color(0xff410e0b));
+ expect(theme.colorScheme.outline, const Color(0xff79747e));
+ expect(theme.colorScheme.background, const Color(0xfffef7ff));
+ expect(theme.colorScheme.onBackground, const Color(0xff1d1b20));
+ expect(theme.colorScheme.surface, const Color(0xfffef7ff));
+ expect(theme.colorScheme.onSurface, const Color(0xff1d1b20));
+ expect(theme.colorScheme.surfaceVariant, const Color(0xffe7e0ec));
+ expect(theme.colorScheme.onSurfaceVariant, const Color(0xff49454f));
+ expect(theme.colorScheme.surfaceBright, const Color(0xfffef7ff));
+ expect(theme.colorScheme.surfaceDim, const Color(0xffded8e1));
+ expect(theme.colorScheme.surfaceContainer, const Color(0xfff3edf7));
+ expect(theme.colorScheme.surfaceContainerHighest, const Color(0xffe6e0e9));
+ expect(theme.colorScheme.surfaceContainerHigh, const Color(0xffece6f0));
+ expect(theme.colorScheme.surfaceContainerLowest, const Color(0xffffffff));
+ expect(theme.colorScheme.surfaceContainerLow, const Color(0xfff7f2fa));
+ expect(theme.colorScheme.inverseSurface, const Color(0xff322f35));
+ expect(theme.colorScheme.onInverseSurface, const Color(0xfff5eff7));
+ expect(theme.colorScheme.inversePrimary, const Color(0xffd0bcff));
+ expect(theme.colorScheme.shadow, const Color(0xff000000));
+ expect(theme.colorScheme.surfaceTint, const Color(0xff6750a4));
expect(theme.colorScheme.brightness, Brightness.light);
expect(theme.primaryColor, theme.colorScheme.primary);
@@ -322,35 +402,53 @@
test('ThemeData.dark() can generate a default M3 dark colorScheme when useMaterial3 is true', () {
final ThemeData theme = ThemeData.dark(useMaterial3: true);
-
- expect(theme.colorScheme.primary, const Color(0xFFD0BCFF));
- expect(theme.colorScheme.onPrimary, const Color(0xFF381E72));
- expect(theme.colorScheme.primaryContainer, const Color(0xFF4F378B));
- expect(theme.colorScheme.onPrimaryContainer, const Color(0xFFEADDFF));
- expect(theme.colorScheme.secondary, const Color(0xFFCCC2DC));
- expect(theme.colorScheme.onSecondary, const Color(0xFF332D41));
- expect(theme.colorScheme.secondaryContainer, const Color(0xFF4A4458));
- expect(theme.colorScheme.onSecondaryContainer, const Color(0xFFE8DEF8));
- expect(theme.colorScheme.tertiary, const Color(0xFFEFB8C8));
- expect(theme.colorScheme.onTertiary, const Color(0xFF492532));
- expect(theme.colorScheme.tertiaryContainer, const Color(0xFF633B48));
- expect(theme.colorScheme.onTertiaryContainer, const Color(0xFFFFD8E4));
- expect(theme.colorScheme.error, const Color(0xFFF2B8B5));
- expect(theme.colorScheme.onError, const Color(0xFF601410));
- expect(theme.colorScheme.errorContainer, const Color(0xFF8C1D18));
- expect(theme.colorScheme.onErrorContainer, const Color(0xFFF9DEDC));
- expect(theme.colorScheme.outline, const Color(0xFF938F99));
- expect(theme.colorScheme.background, const Color(0xFF1C1B1F));
- expect(theme.colorScheme.onBackground, const Color(0xFFE6E1E5));
- expect(theme.colorScheme.surface, const Color(0xFF1C1B1F));
- expect(theme.colorScheme.onSurface, const Color(0xFFE6E1E5));
- expect(theme.colorScheme.surfaceVariant, const Color(0xFF49454F));
- expect(theme.colorScheme.onSurfaceVariant, const Color(0xFFCAC4D0));
- expect(theme.colorScheme.inverseSurface, const Color(0xFFE6E1E5));
- expect(theme.colorScheme.onInverseSurface, const Color(0xFF313033));
- expect(theme.colorScheme.inversePrimary, const Color(0xFF6750A4));
- expect(theme.colorScheme.shadow, const Color(0xFF000000));
- expect(theme.colorScheme.surfaceTint, const Color(0xFFD0BCFF));
+ expect(theme.colorScheme.primary, const Color(0xffd0bcff));
+ expect(theme.colorScheme.onPrimary, const Color(0xff381e72));
+ expect(theme.colorScheme.primaryContainer, const Color(0xff4f378b));
+ expect(theme.colorScheme.onPrimaryContainer, const Color(0xffeaddff));
+ expect(theme.colorScheme.primaryFixed, const Color(0xffeaddff));
+ expect(theme.colorScheme.primaryFixedDim, const Color(0xffd0bcff));
+ expect(theme.colorScheme.onPrimaryFixed, const Color(0xff21005d));
+ expect(theme.colorScheme.onPrimaryFixedVariant, const Color(0xff4f378b));
+ expect(theme.colorScheme.secondary, const Color(0xffccc2dc));
+ expect(theme.colorScheme.onSecondary, const Color(0xff332d41));
+ expect(theme.colorScheme.secondaryContainer, const Color(0xff4a4458));
+ expect(theme.colorScheme.onSecondaryContainer, const Color(0xffe8def8));
+ expect(theme.colorScheme.secondaryFixed, const Color(0xffe8def8));
+ expect(theme.colorScheme.secondaryFixedDim, const Color(0xffccc2dc));
+ expect(theme.colorScheme.onSecondaryFixed, const Color(0xff1d192b));
+ expect(theme.colorScheme.onSecondaryFixedVariant, const Color(0xff4a4458));
+ expect(theme.colorScheme.tertiary, const Color(0xffefb8c8));
+ expect(theme.colorScheme.onTertiary, const Color(0xff492532));
+ expect(theme.colorScheme.tertiaryContainer, const Color(0xff633b48));
+ expect(theme.colorScheme.onTertiaryContainer, const Color(0xffffd8e4));
+ expect(theme.colorScheme.tertiaryFixed, const Color(0xffffd8e4));
+ expect(theme.colorScheme.tertiaryFixedDim, const Color(0xffefb8c8));
+ expect(theme.colorScheme.onTertiaryFixed, const Color(0xff31111d));
+ expect(theme.colorScheme.onTertiaryFixedVariant, const Color(0xff633b48));
+ expect(theme.colorScheme.error, const Color(0xfff2b8b5));
+ expect(theme.colorScheme.onError, const Color(0xff601410));
+ expect(theme.colorScheme.errorContainer, const Color(0xff8c1d18));
+ expect(theme.colorScheme.onErrorContainer, const Color(0xfff9dedc));
+ expect(theme.colorScheme.outline, const Color(0xff938f99));
+ expect(theme.colorScheme.background, const Color(0xff141218));
+ expect(theme.colorScheme.onBackground, const Color(0xffe6e0e9));
+ expect(theme.colorScheme.surface, const Color(0xff141218));
+ expect(theme.colorScheme.onSurface, const Color(0xffe6e0e9));
+ expect(theme.colorScheme.surfaceVariant, const Color(0xff49454f));
+ expect(theme.colorScheme.onSurfaceVariant, const Color(0xffcac4d0));
+ expect(theme.colorScheme.surfaceBright, const Color(0xff3b383e));
+ expect(theme.colorScheme.surfaceDim, const Color(0xff141218));
+ expect(theme.colorScheme.surfaceContainer, const Color(0xff211f26));
+ expect(theme.colorScheme.surfaceContainerHighest, const Color(0xff36343b));
+ expect(theme.colorScheme.surfaceContainerHigh, const Color(0xff2b2930));
+ expect(theme.colorScheme.surfaceContainerLowest, const Color(0xff0f0d13));
+ expect(theme.colorScheme.surfaceContainerLow, const Color(0xff1d1b20));
+ expect(theme.colorScheme.inverseSurface, const Color(0xffe6e0e9));
+ expect(theme.colorScheme.onInverseSurface, const Color(0xff322f35));
+ expect(theme.colorScheme.inversePrimary, const Color(0xff6750a4));
+ expect(theme.colorScheme.shadow, const Color(0xff000000));
+ expect(theme.colorScheme.surfaceTint, const Color(0xffd0bcff));
expect(theme.colorScheme.brightness, Brightness.dark);
expect(theme.primaryColor, theme.colorScheme.surface);
diff --git a/packages/flutter/test/material/theme_test.dart b/packages/flutter/test/material/theme_test.dart
index d8d71a8..066f3d4 100644
--- a/packages/flutter/test/material/theme_test.dart
+++ b/packages/flutter/test/material/theme_test.dart
@@ -598,7 +598,7 @@
expect(themeM3.brightness, Brightness.light);
expect(themeM3.primaryColor, const Color(0xff6750a4));
- expect(themeM3.scaffoldBackgroundColor, const Color(0xfffffbfe)); // ColorScheme.background
+ expect(themeM3.scaffoldBackgroundColor, const Color(0xfffef7ff)); // ColorScheme.background
expect(themeM3.primaryContrastingColor, Colors.white);
expect(themeM3.textTheme.textStyle.fontFamily, 'CupertinoSystemText');
expect(themeM3.textTheme.textStyle.fontSize, 17.0);
@@ -621,7 +621,7 @@
expect(themeM3.brightness, Brightness.dark);
expect(themeM3.primaryColor, const Color(0xffd0bcff));
expect(themeM3.primaryContrastingColor, const Color(0xff381e72));
- expect(themeM3.scaffoldBackgroundColor, const Color(0xff1c1b1f));
+ expect(themeM3.scaffoldBackgroundColor, const Color(0xff141218));
expect(themeM3.textTheme.textStyle.fontFamily, 'CupertinoSystemText');
expect(themeM3.textTheme.textStyle.fontSize, 17.0);
});
diff --git a/packages/flutter/test/material/time_picker_test.dart b/packages/flutter/test/material/time_picker_test.dart
index 52f2c19..7585745 100644
--- a/packages/flutter/test/material/time_picker_test.dart
+++ b/packages/flutter/test/material/time_picker_test.dart
@@ -261,7 +261,7 @@
expect(
dial,
paints
- ..circle(color: theme.colorScheme.surfaceVariant) // Dial background color.
+ ..circle(color: theme.colorScheme.surfaceContainerHighest) // Dial background color.
..circle(color: Color(theme.colorScheme.primary.value)), // Dial hand color.
);
@@ -284,7 +284,7 @@
expect(
dial,
paints
- ..circle(color: const Color(0xffff0000)) // Dial background color.
+ ..circle(color: theme.colorScheme.surfaceContainerHighest) // Dial background color.
..circle(color: Color(theme.colorScheme.primary.value)), // Dial hand color.
);
});
diff --git a/packages/flutter/test/material/time_picker_theme_test.dart b/packages/flutter/test/material/time_picker_theme_test.dart
index 182ec80..a4098d4 100644
--- a/packages/flutter/test/material/time_picker_theme_test.dart
+++ b/packages/flutter/test/material/time_picker_theme_test.dart
@@ -268,7 +268,7 @@
await tester.pumpAndSettle(const Duration(seconds: 1));
final Material dialogMaterial = _dialogMaterial(tester);
- expect(dialogMaterial.color, defaultTheme.colorScheme.surface);
+ expect(dialogMaterial.color, defaultTheme.colorScheme.surfaceContainerHigh);
expect(
dialogMaterial.shape,
const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(28.0))),
@@ -278,7 +278,7 @@
expect(
dial,
paints
- ..circle(color: defaultTheme.colorScheme.surfaceVariant) // Dial background color.
+ ..circle(color: defaultTheme.colorScheme.surfaceContainerHighest) // Dial background color.
..circle(color: Color(defaultTheme.colorScheme.primary.value)), // Dial hand color.
);
@@ -372,7 +372,7 @@
);
final Material minuteMaterial = _textMaterial(tester, '15');
- expect(minuteMaterial.color, defaultTheme.colorScheme.surfaceVariant);
+ expect(minuteMaterial.color, defaultTheme.colorScheme.surfaceContainerHighest);
expect(
minuteMaterial.shape,
const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8.0))),
@@ -481,7 +481,7 @@
final InputDecoration hourDecoration = _textField(tester, '7').decoration!;
expect(hourDecoration.filled, true);
- expect(hourDecoration.fillColor, defaultTheme.colorScheme.surfaceVariant);
+ expect(hourDecoration.fillColor, defaultTheme.colorScheme.surfaceContainerHighest);
expect(
hourDecoration.enabledBorder,
const OutlineInputBorder(
@@ -666,7 +666,7 @@
Typography.material2021().englishLike.bodyMedium!
.merge(Typography.material2021().black.bodyMedium)
.merge(timePickerTheme.hourMinuteTextStyle)
- .copyWith(color: _selectedColor, decorationColor: const Color(0xff1c1b1f)),
+ .copyWith(color: _selectedColor, decorationColor: const Color(0xff1d1b20)),
);
final RenderParagraph minuteText = _textRenderParagraph(tester, '15');
@@ -675,7 +675,7 @@
Typography.material2021().englishLike.bodyMedium!
.merge(Typography.material2021().black.bodyMedium)
.merge(timePickerTheme.hourMinuteTextStyle)
- .copyWith(color: _unselectedColor, decorationColor: const Color(0xff1c1b1f)),
+ .copyWith(color: _unselectedColor, decorationColor: const Color(0xff1d1b20)),
);
final RenderParagraph amText = _textRenderParagraph(tester, 'AM');
@@ -684,7 +684,7 @@
Typography.material2021().englishLike.bodyMedium!
.merge(Typography.material2021().black.bodyMedium)
.merge(timePickerTheme.hourMinuteTextStyle)
- .copyWith(color: _selectedColor, decorationColor: const Color(0xff1c1b1f)),
+ .copyWith(color: _selectedColor, decorationColor: const Color(0xff1d1b20)),
);
final RenderParagraph pmText = _textRenderParagraph(tester, 'PM');
@@ -693,7 +693,7 @@
Typography.material2021().englishLike.bodyMedium!
.merge(Typography.material2021().black.bodyMedium)
.merge(timePickerTheme.hourMinuteTextStyle)
- .copyWith(color: _unselectedColor, decorationColor: const Color(0xff1c1b1f)),
+ .copyWith(color: _unselectedColor, decorationColor: const Color(0xff1d1b20)),
);
final RenderParagraph helperText = _textRenderParagraph(tester, 'Select time');
diff --git a/packages/flutter/test_fixes/material/color_scheme.dart b/packages/flutter/test_fixes/material/color_scheme.dart
index 877d09d..6eac391 100644
--- a/packages/flutter/test_fixes/material/color_scheme.dart
+++ b/packages/flutter/test_fixes/material/color_scheme.dart
@@ -15,4 +15,22 @@
colorScheme = colorScheme.copyWith(primaryVariant: Colors.black, secondaryVariant: Colors.white);
colorScheme.primaryVariant; // Removing field reference not supported.
colorScheme.secondaryVariant;
+
+ // Changes made in https://github.com/flutter/flutter/pull/138521
+ ColorScheme colorScheme = ColorScheme();
+ colorScheme = ColorScheme(background: Colors.black, onBackground: Colors.white, surfaceVariant: Colors.red);
+ colorScheme = ColorScheme(background: Colors.black, surface: Colors.orange, onBackground: Colors.white, onSurface: Colors.yellow, surfaceVariant: Colors.red, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.light(background: Colors.black, onBackground: Colors.white, surfaceVariant: Colors.red);
+ colorScheme = ColorScheme.light(background: Colors.black, surface: Colors.orange, onBackground: Colors.white, onSurface: Colors.yellow, surfaceVariant: Colors.red, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.dark(background: Colors.black, onBackground: Colors.white, surfaceVariant: Colors.red);
+ colorScheme = ColorScheme.dark(background: Colors.black, surface: Colors.orange, onBackground: Colors.white, onSurface: Colors.yellow, surfaceVariant: Colors.red, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.highContrastLight(background: Colors.black, onBackground: Colors.white, surfaceVariant: Colors.red);
+ colorScheme = ColorScheme.highContrastLight(background: Colors.black, surface: Colors.orange, onBackground: Colors.white, onSurface: Colors.yellow, surfaceVariant: Colors.red, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.highContrastDark(background: Colors.black, onBackground: Colors.white, surfaceVariant: Colors.red);
+ colorScheme = ColorScheme.highContrastDark(background: Colors.black, surface: Colors.orange, onBackground: Colors.white, onSurface: Colors.yellow, surfaceVariant: Colors.red, surfaceContainerHighest: Colors.blue);
+ colorScheme = colorScheme.copyWith(background: Colors.black, onBackground: Colors.white, surfaceVariant: Colors.red);
+ colorScheme = colorScheme.copyWith(background: Colors.black, surface: Colors.orange, onBackground: Colors.white, onSurface: Colors.yellow, surfaceVariant: Colors.red, surfaceContainerHighest: Colors.blue);
+ colorScheme.background;
+ colorScheme.onBackground;
+ colorScheme.surfaceVariant;
}
diff --git a/packages/flutter/test_fixes/material/color_scheme.dart.expect b/packages/flutter/test_fixes/material/color_scheme.dart.expect
index b270083..dc73ce0 100644
--- a/packages/flutter/test_fixes/material/color_scheme.dart.expect
+++ b/packages/flutter/test_fixes/material/color_scheme.dart.expect
@@ -15,4 +15,22 @@
colorScheme = colorScheme.copyWith();
colorScheme.primaryContainer; // Removing field reference not supported.
colorScheme.secondaryContainer;
+
+ // Changes made in https://github.com/flutter/flutter/pull/138521
+ ColorScheme colorScheme = ColorScheme();
+ colorScheme = ColorScheme(surface: Colors.black, onSurface: Colors.white, surfaceContainerHighest: Colors.red);
+ colorScheme = ColorScheme(surface: Colors.orange, onSurface: Colors.yellow, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.light(surface: Colors.black, onSurface: Colors.white, surfaceContainerHighest: Colors.red);
+ colorScheme = ColorScheme.light(surface: Colors.orange, onSurface: Colors.yellow, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.dark(surface: Colors.black, onSurface: Colors.white, surfaceContainerHighest: Colors.red);
+ colorScheme = ColorScheme.dark(surface: Colors.orange, onSurface: Colors.yellow, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.highContrastLight(surface: Colors.black, onSurface: Colors.white, surfaceContainerHighest: Colors.red);
+ colorScheme = ColorScheme.highContrastLight(surface: Colors.orange, onSurface: Colors.yellow, surfaceContainerHighest: Colors.blue);
+ colorScheme = ColorScheme.highContrastDark(surface: Colors.black, onSurface: Colors.white, surfaceContainerHighest: Colors.red);
+ colorScheme = ColorScheme.highContrastDark(surface: Colors.orange, onSurface: Colors.yellow, surfaceContainerHighest: Colors.blue);
+ colorScheme = colorScheme.copyWith(surface: Colors.black, onSurface: Colors.white, surfaceContainerHighest: Colors.red);
+ colorScheme = colorScheme.copyWith(surface: Colors.orange, onSurface: Colors.yellow, surfaceContainerHighest: Colors.blue);
+ colorScheme.surface;
+ colorScheme.onSurface;
+ colorScheme.surfaceContainerHighest;
}
diff --git a/packages/flutter/test_fixes/material/theme_data.dart.expect b/packages/flutter/test_fixes/material/theme_data.dart.expect
index 9430d93..e21ac79 100644
--- a/packages/flutter/test_fixes/material/theme_data.dart.expect
+++ b/packages/flutter/test_fixes/material/theme_data.dart.expect
@@ -412,28 +412,28 @@
// Changes made in https://github.com/flutter/flutter/pull/110162
ThemeData themeData = ThemeData();
- themeData = ThemeData(colorScheme: ColorScheme(background: Colors.grey));
- themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey));
- themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(background: Colors.grey));
- themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey));
+ themeData = ThemeData(colorScheme: ColorScheme(surface: Colors.grey));
+ themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(surface: Colors.grey));
+ themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(surface: Colors.grey));
+ themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, surface: Colors.grey));
themeData = ThemeData(otherParam: '');
- themeData = ThemeData.raw(colorScheme: ColorScheme(background: Colors.grey));
- themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey));
- themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(background: Colors.grey));
- themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey));
+ themeData = ThemeData.raw(colorScheme: ColorScheme(surface: Colors.grey));
+ themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(surface: Colors.grey));
+ themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(surface: Colors.grey));
+ themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, surface: Colors.grey));
themeData = ThemeData.raw(otherParam: '');
- themeData = themeData.copyWith(colorScheme: ColorScheme(background: Colors.grey));
+ themeData = themeData.copyWith(colorScheme: ColorScheme(surface: Colors.grey));
themeData = themeData.copyWith(otherParam: '');
- themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey));
- themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(background: Colors.grey));
- themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey));
- themeData.colorScheme.background;
+ themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(surface: Colors.grey));
+ themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(surface: Colors.grey));
+ themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, surface: Colors.grey));
+ themeData.colorScheme.surface;
// Changes made in https://github.com/flutter/flutter/pull/110162
ThemeData themeData = ThemeData();
- themeData = ThemeData(colorScheme: ColorScheme(background: Colors.grey).copyWith(error: Colors.red));
- themeData = ThemeData.raw(colorScheme: ColorScheme(background: Colors.grey).copyWith(error: Colors.red));
- themeData = themeData.copyWith(colorScheme: ColorScheme(background: Colors.grey).copyWith(error: Colors.red));
+ themeData = ThemeData(colorScheme: ColorScheme(surface: Colors.grey).copyWith(error: Colors.red));
+ themeData = ThemeData.raw(colorScheme: ColorScheme(surface: Colors.grey).copyWith(error: Colors.red));
+ themeData = themeData.copyWith(colorScheme: ColorScheme(surface: Colors.grey).copyWith(error: Colors.red));
// Changes made in https://github.com/flutter/flutter/pull/111080
ThemeData themeData = ThemeData();
diff --git a/packages/flutter_test/test/accessibility_test.dart b/packages/flutter_test/test/accessibility_test.dart
index 2bf455c..6f58d05 100644
--- a/packages/flutter_test/test/accessibility_test.dart
+++ b/packages/flutter_test/test/accessibility_test.dart
@@ -330,10 +330,10 @@
result.reason,
'SemanticsNode#4(Rect.fromLTRB(300.0, 200.0, 500.0, 400.0), '
'label: "this is a test", textDirection: ltr):\n'
- 'Expected contrast ratio of at least 4.5 but found 1.19 for a font '
+ 'Expected contrast ratio of at least 4.5 but found 1.16 for a font '
'size of 14.0.\n'
'The computed colors was:\n'
- 'light - Color(0xfffffbfe), dark - Color(0xffffeb3b)\n'
+ 'light - Color(0xfffef7ff), dark - Color(0xffffeb3b)\n'
'See also: https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html',
);
handle.dispose();