forked from firka/flutter
Introduce tone-based surfaces and accent color add-ons - Part 2 (#138521)
This PR is to introduce 19 new color roles and deprecate 3 color roles in `ColorScheme`. **Tone-based surface colors** (7 colors): * surfaceBright * surfaceDim * surfaceContainer * surfaceContainerLowest * surfaceContainerLow * surfaceContainerHigh * surfaceContainerHighest **Accent color add-ons** (12 colors): * primary/secondary/tertiary-Fixed * primary/secondary/tertiary-FixedDim * onPrimary/onSecondary/onTertiary-Fixed * onPrimary/onSecondary/onTertiary-FixedVariant **Deprecated colors**: * background -> replaced with surface * onBackground -> replaced with onSurface * surfaceVariant -> replaced with surfaceContainerHighest Please checkout this [design doc](https://docs.google.com/document/d/1ODqivpM_6c490T4j5XIiWCDKo5YqHy78YEFqDm4S8h4/edit?usp=sharing) for more information:) 
This commit is contained in:
@@ -443,7 +443,7 @@ class Cards extends StatelessWidget {
|
||||
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 @@ class _IconToggleButtonState extends State<IconToggleButton> {
|
||||
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 @@ ButtonStyle enabledFilledTonalButtonStyle(bool selected, ColorScheme colors) {
|
||||
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 @@ class ComponentGroupDecoration extends StatelessWidget {
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user