diff --git a/lib/res/theme.dart b/lib/res/theme.dart index 5bd9b19..2ae0e13 100644 --- a/lib/res/theme.dart +++ b/lib/res/theme.dart @@ -73,7 +73,7 @@ ThemeData themeFrom(Color primaryColor, Brightness brightness) { } ColorScheme _colorSchemeFromColor(Color primaryColor, Brightness brightness) { - final scheme = SchemeRainbow( + final scheme = SchemeTonalSpot( sourceColorHct: Hct.fromInt(primaryColor.value), isDark: brightness == Brightness.dark, contrastLevel: 0.0, @@ -82,10 +82,10 @@ ColorScheme _colorSchemeFromColor(Color primaryColor, Brightness brightness) { return ColorScheme( brightness: brightness, background: Color(scheme.background), - error: Color(scheme.error), - errorContainer: Color(scheme.errorContainer), onBackground: Color(scheme.onBackground), + error: Color(scheme.error), onError: Color(scheme.onError), + errorContainer: Color(scheme.errorContainer), onErrorContainer: Color(scheme.onErrorContainer), primary: Color(scheme.primary), onPrimary: Color(scheme.onPrimary), @@ -93,18 +93,21 @@ ColorScheme _colorSchemeFromColor(Color primaryColor, Brightness brightness) { onPrimaryContainer: Color(scheme.onPrimaryContainer), secondary: Color(scheme.secondary), onSecondary: Color(scheme.onSecondary), - surface: Color.alphaBlend( - Color(scheme.primary).withOpacity(0.05), - Color(scheme.background), - ), + secondaryContainer: Color(scheme.secondaryContainer), + onSecondaryContainer: Color(scheme.onSecondaryContainer), + tertiary: Color(scheme.tertiary), + onTertiary: Color(scheme.onTertiary), + tertiaryContainer: Color(scheme.tertiaryContainer), + onTertiaryContainer: Color(scheme.onTertiaryContainer), + surface: Color(scheme.surface), onSurface: Color(scheme.onSurface), - surfaceVariant: Color.alphaBlend( - Color(scheme.primary).withOpacity(0.5), - Color(scheme.background), - ), + surfaceVariant: Color(scheme.surfaceVariant), onSurfaceVariant: Color(scheme.onSurfaceVariant), outline: Color(scheme.outline), outlineVariant: Color(scheme.outlineVariant), + surfaceTint: Color(scheme.surfaceTint), + shadow: Color(scheme.shadow), + scrim: Color(scheme.scrim), ); } diff --git a/lib/screens/metering/components/shared/readings_container/components/shared/reading_value_container/widget_container_reading_value.dart b/lib/screens/metering/components/shared/readings_container/components/shared/reading_value_container/widget_container_reading_value.dart index 771dc76..432213b 100644 --- a/lib/screens/metering/components/shared/readings_container/components/shared/reading_value_container/widget_container_reading_value.dart +++ b/lib/screens/metering/components/shared/readings_container/components/shared/reading_value_container/widget_container_reading_value.dart @@ -47,31 +47,31 @@ class ReadingValueContainer extends StatelessWidget implements AnimatedDialogClo @override Widget build(BuildContext context) { - return ClipRRect( - borderRadius: BorderRadius.circular(Dimens.borderRadiusM), - child: ColoredBox( + return DecoratedBox( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(Dimens.borderRadiusM), color: backgroundColor(context), - child: Padding( - padding: const EdgeInsets.all(Dimens.paddingM), - child: Stack( - children: [ - if (locked) - Positioned( - top: 0, - right: 0, - child: Icon( - Icons.lock_outlined, - size: Theme.of(context).textTheme.labelMedium!.fontSize, - color: Theme.of(context).colorScheme.onPrimaryContainer, - ), + ), + child: Padding( + padding: const EdgeInsets.all(Dimens.paddingM), + child: Stack( + children: [ + if (locked) + Positioned( + top: 0, + right: 0, + child: Icon( + Icons.lock_outlined, + size: Theme.of(context).textTheme.labelMedium!.fontSize, + color: Theme.of(context).colorScheme.onPrimaryContainer, ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: _items, ), - ], - ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: _items, + ), + ], ), ), ); diff --git a/test/screens/metering/goldens/metering_screen.png b/test/screens/metering/goldens/metering_screen.png index 6184408..a88dc2c 100644 Binary files a/test/screens/metering/goldens/metering_screen.png and b/test/screens/metering/goldens/metering_screen.png differ diff --git a/test/screens/settings/goldens/settings_screen.png b/test/screens/settings/goldens/settings_screen.png index 1499eb5..1c65c19 100644 Binary files a/test/screens/settings/goldens/settings_screen.png and b/test/screens/settings/goldens/settings_screen.png differ diff --git a/test/screens/timer/goldens/timer_screen.png b/test/screens/timer/goldens/timer_screen.png index 0226722..cb3aa24 100644 Binary files a/test/screens/timer/goldens/timer_screen.png and b/test/screens/timer/goldens/timer_screen.png differ