Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (#144001)

Reverts flutter/flutter#143973

This is a reland for #138521 with an updated g3fix(cl/605555997). Local test: cl/609608958.
This commit is contained in:
Qun Cheng
2024-02-27 20:21:14 +00:00
committed by GitHub
parent 609d30fe58
commit 871d59221c
181 changed files with 2519 additions and 998 deletions

View File

@@ -202,7 +202,7 @@ class KeyPad extends StatelessWidget {
),
Expanded(
child: Material(
color: themeData.colorScheme.background,
color: themeData.colorScheme.surface,
child: Column(
children: <Widget>[
CalcKey('\u232B', calcState!.handleDelTap),

View File

@@ -203,7 +203,7 @@ class _ChipDemoState extends State<ChipDemo> {
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();
}

View File

@@ -114,12 +114,10 @@ const ColorScheme kShrineColorScheme = ColorScheme(
primary: kShrinePink100,
secondary: kShrinePink50,
surface: kShrineSurfaceWhite,
background: kShrineBackgroundWhite,
error: kShrineErrorRed,
onPrimary: kShrineBrown900,
onSecondary: kShrineBrown900,
onSurface: kShrineBrown900,
onBackground: kShrineBrown900,
onError: kShrineSurfaceWhite,
brightness: Brightness.light,
);

View File

@@ -23,7 +23,7 @@ ThemeData _buildDarkTheme() {
secondary: secondaryColor,
onPrimary: Colors.white,
error: const Color(0xFFB00020),
background: const Color(0xFF202124),
surface: const Color(0xFF202124),
);
final ThemeData base = ThemeData(
useMaterial3: false,