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

This commit is contained in:
Qun Cheng
2024-02-28 21:55:50 +00:00
committed by GitHub
parent 88f75712d7
commit 0d8eafb006
181 changed files with 2516 additions and 996 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,