From 49d2136373442332b0ede9f28308999a692a59ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr> Date: Fri, 20 Sep 2024 23:10:11 +0200 Subject: [PATCH] Remove deprecations --- lib/config/theme.dart | 8 ++------ lib/ui/screens/api_page.dart | 2 +- lib/ui/screens/camera_page.dart | 2 +- lib/ui/screens/demo_page.dart | 2 +- lib/ui/skeleton.dart | 6 +++--- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/config/theme.dart b/lib/config/theme.dart index be39034..138460e 100644 --- a/lib/config/theme.dart +++ b/lib/config/theme.dart @@ -39,11 +39,9 @@ final ColorScheme lightColorScheme = ColorScheme.light( secondary: primarySwatch.shade500, onSecondary: Colors.white, error: errorColor, - background: textSwatch.shade200, - onBackground: textSwatch.shade500, onSurface: textSwatch.shade500, surface: textSwatch.shade50, - surfaceVariant: Colors.white, + surfaceContainerHighest: Colors.white, shadow: textSwatch.shade900.withOpacity(.1), ); @@ -52,11 +50,9 @@ final ColorScheme darkColorScheme = ColorScheme.dark( secondary: primarySwatch.shade500, onSecondary: Colors.white, error: errorColor, - background: const Color(0xFF171724), - onBackground: textSwatch.shade400, onSurface: textSwatch.shade300, surface: const Color(0xFF262630), - surfaceVariant: const Color(0xFF282832), + surfaceContainerHighest: const Color(0xFF282832), shadow: textSwatch.shade900.withOpacity(.2), ); diff --git a/lib/ui/screens/api_page.dart b/lib/ui/screens/api_page.dart index 22dc963..1441fac 100644 --- a/lib/ui/screens/api_page.dart +++ b/lib/ui/screens/api_page.dart @@ -12,7 +12,7 @@ class ApiPage extends StatelessWidget { @override Widget build(BuildContext context) { return Material( - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, child: ListView( padding: const EdgeInsets.symmetric(horizontal: 4), physics: const BouncingScrollPhysics(), diff --git a/lib/ui/screens/camera_page.dart b/lib/ui/screens/camera_page.dart index 828c6e2..668b889 100644 --- a/lib/ui/screens/camera_page.dart +++ b/lib/ui/screens/camera_page.dart @@ -12,7 +12,7 @@ class CameraPage extends StatelessWidget { @override Widget build(BuildContext context) { return Material( - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, child: const Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/ui/screens/demo_page.dart b/lib/ui/screens/demo_page.dart index 2c7269e..06b0cbe 100644 --- a/lib/ui/screens/demo_page.dart +++ b/lib/ui/screens/demo_page.dart @@ -13,7 +13,7 @@ class DemoPage extends StatelessWidget { @override Widget build(BuildContext context) { return Material( - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, child: ListView( padding: const EdgeInsets.symmetric(horizontal: 4), physics: const BouncingScrollPhysics(), diff --git a/lib/ui/skeleton.dart b/lib/ui/skeleton.dart index 5a4051d..d22acea 100644 --- a/lib/ui/skeleton.dart +++ b/lib/ui/skeleton.dart @@ -24,10 +24,10 @@ class _SkeletonScreenState extends State<SkeletonScreen> { return Menu.getPageWidget(pageIndex); }, ), - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, bottomNavigationBar: CurvedNavigationBar( - color: Theme.of(context).colorScheme.onBackground, - backgroundColor: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.onSurface, + backgroundColor: Theme.of(context).colorScheme.surface, animationDuration: const Duration(milliseconds: 200), height: 50, items: Menu.items.map((MenuItem item) => item.icon).toList(), -- GitLab