1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Updates for 3.22 (#2266)

Updates for 3.22

---------

Co-authored-by: Brett Morgan <brettmorgan@google.com>
Co-authored-by: Qun Cheng <chengqunq@gmail.com>
Co-authored-by: Brett Morgan <brett.morgan@gmail.com>
This commit is contained in:
Eric Windmill
2024-05-14 10:37:24 -04:00
committed by GitHub
parent 71fef7c869
commit 3172aff8f8
14 changed files with 104 additions and 120 deletions

View File

@@ -250,14 +250,14 @@ class ColorSchemeView extends StatelessWidget {
onColor: colorScheme.surface,
),
ColorChip(
label: 'surfaceVariant',
color: colorScheme.surfaceVariant,
onColor: colorScheme.onSurfaceVariant,
label: 'surfaceContainerHighest',
color: colorScheme.surfaceContainerHighest,
onColor: colorScheme.surfaceContainerHighest,
),
ColorChip(
label: 'onSurfaceVariant',
color: colorScheme.onSurfaceVariant,
onColor: colorScheme.surfaceVariant,
label: 'surfaceContainerHighest',
color: colorScheme.surfaceContainerHighest,
onColor: colorScheme.surfaceContainerHighest,
),
ColorChip(
label: 'surfaceTint',
@@ -303,13 +303,13 @@ class ColorSchemeView extends StatelessWidget {
children: [
ColorChip(
label: 'background',
color: colorScheme.background,
onColor: colorScheme.onBackground,
color: colorScheme.surface,
onColor: colorScheme.onSurface,
),
ColorChip(
label: 'onBackground',
color: colorScheme.onBackground,
onColor: colorScheme.background,
label: 'onSurface',
color: colorScheme.onSurface,
onColor: colorScheme.surface,
),
ColorChip(
label: 'scrim',

View File

@@ -501,7 +501,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),
@@ -849,9 +849,9 @@ class _SwitchRowState extends State<SwitchRow> {
bool value0 = false;
bool value1 = true;
final MaterialStateProperty<Icon?> thumbIcon =
MaterialStateProperty.resolveWith<Icon?>((states) {
if (states.contains(MaterialState.selected)) {
final WidgetStateProperty<Icon?> thumbIcon =
WidgetStateProperty.resolveWith<Icon?>((states) {
if (states.contains(WidgetState.selected)) {
return const Icon(Icons.check);
}
return const Icon(Icons.close);
@@ -2508,7 +2508,10 @@ 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(

View File

@@ -313,7 +313,7 @@ class _ColorSeedButton extends StatelessWidget {
return PopupMenuButton(
icon: Icon(
Icons.palette_outlined,
color: Theme.of(context).colorScheme.onSurfaceVariant,
color: Theme.of(context).colorScheme.surfaceContainerHighest,
),
tooltip: 'Select a seed color',
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
@@ -367,7 +367,7 @@ class _ColorImageButton extends StatelessWidget {
return PopupMenuButton(
icon: Icon(
Icons.image_outlined,
color: Theme.of(context).colorScheme.onSurfaceVariant,
color: Theme.of(context).colorScheme.surfaceContainerHighest,
),
tooltip: 'Select a color extraction image',
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),