From 5cbb9a12dc097601d8c8952de49d020872b1bb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Mon, 22 Apr 2024 16:25:59 +0200 Subject: [PATCH] fix: remove deprecated code --- lib/util/color_schemes.g.dart | 8 ++------ lib/views/create_entry.dart | 5 +++-- lib/views/home.dart | 6 +++--- lib/views/settings/graph_type.dart | 2 +- lib/views/settings/settings.dart | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/util/color_schemes.g.dart b/lib/util/color_schemes.g.dart index 47200d1..05e9f27 100644 --- a/lib/util/color_schemes.g.dart +++ b/lib/util/color_schemes.g.dart @@ -20,11 +20,9 @@ const lightColorScheme = ColorScheme( errorContainer: Color(0xFFFFDAD6), onError: Color(0xFFFFFFFF), onErrorContainer: Color(0xFF410002), - background: Color(0xFFFBFDF8), - onBackground: Color(0xFF191C19), surface: Color(0xFFFBFDF8), onSurface: Color(0xFF191C19), - surfaceVariant: Color(0xFFDCE5DB), + surfaceContainerHighest: Color(0xFFDCE5DB), onSurfaceVariant: Color(0xFF414942), outline: Color(0xFF717971), onInverseSurface: Color(0xFFF0F1EC), @@ -54,11 +52,9 @@ const darkColorScheme = ColorScheme( errorContainer: Color(0xFF93000A), onError: Color(0xFF690005), onErrorContainer: Color(0xFFFFDAD6), - background: Color(0xFF191C19), - onBackground: Color(0xFFE1E3DE), surface: Color(0xFF191C19), onSurface: Color(0xFFE1E3DE), - surfaceVariant: Color(0xFF414942), + surfaceContainerHighest: Color(0xFF414942), onSurfaceVariant: Color(0xFFC0C9BF), outline: Color(0xFF8B938A), onInverseSurface: Color(0xFF191C19), diff --git a/lib/views/create_entry.dart b/lib/views/create_entry.dart index 937e5af..77d8492 100644 --- a/lib/views/create_entry.dart +++ b/lib/views/create_entry.dart @@ -29,6 +29,7 @@ class CreateSingleEntryView extends StatefulWidget { /// Is null unless we are editing an existing entry final WalletSingleEntry? editEntry; + /// Locale as set on user's system final String locale; @override @@ -191,10 +192,10 @@ class _CreateSingleEntryViewState extends State { Text(AppLocalizations.of(context).date), PlatformButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Theme.of(context).colorScheme.primary, ), - foregroundColor: MaterialStateProperty.all( + foregroundColor: WidgetStateProperty.all( Theme.of(context).colorScheme.onPrimary, ), ), diff --git a/lib/views/home.dart b/lib/views/home.dart index 23c82e9..8d0b840 100644 --- a/lib/views/home.dart +++ b/lib/views/home.dart @@ -355,7 +355,7 @@ class _HomeViewState extends State { style: TextStyle( color: Theme.of(context) .colorScheme - .onBackground, + .onSurface, ), ), TextSpan( @@ -405,7 +405,7 @@ class _HomeViewState extends State { style: TextStyle( color: Theme.of(context) .colorScheme - .onBackground, + .onSurface, ), ), ], @@ -590,7 +590,7 @@ class _HomeViewState extends State { style: TextStyle( color: Theme.of(context) .colorScheme - .background + .surface .calculateTextColor(), ), ), diff --git a/lib/views/settings/graph_type.dart b/lib/views/settings/graph_type.dart index b946ba6..278d5b8 100644 --- a/lib/views/settings/graph_type.dart +++ b/lib/views/settings/graph_type.dart @@ -37,7 +37,7 @@ class _GraphTypeSettingsViewState extends State { body: SettingsList( applicationType: ApplicationType.both, darkTheme: SettingsThemeData( - settingsListBackground: Theme.of(context).colorScheme.background, + settingsListBackground: Theme.of(context).colorScheme.surface, titleTextColor: Theme.of(context).colorScheme.primary, ), sections: [ diff --git a/lib/views/settings/settings.dart b/lib/views/settings/settings.dart index 47ea3d1..0570525 100644 --- a/lib/views/settings/settings.dart +++ b/lib/views/settings/settings.dart @@ -42,7 +42,7 @@ class _SettingsViewState extends State { body: SettingsList( applicationType: ApplicationType.both, darkTheme: SettingsThemeData( - settingsListBackground: Theme.of(context).colorScheme.background, + settingsListBackground: Theme.of(context).colorScheme.surface, titleTextColor: Theme.of(context).colorScheme.primary, ), sections: [