From d077d9a2933cebe067ab49d8b5ecabdfa221dbae Mon Sep 17 00:00:00 2001 From: zoe Date: Mon, 26 Sep 2022 12:04:53 +0200 Subject: [PATCH] clean up colors --- lib/themes/themes.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/themes/themes.dart b/lib/themes/themes.dart index 75b6e11..f8a7961 100644 --- a/lib/themes/themes.dart +++ b/lib/themes/themes.dart @@ -23,7 +23,8 @@ final available = [ ThemeData getTheme(CustomColors colors) { return ThemeData( - floatingActionButtonTheme: const FloatingActionButtonThemeData( + floatingActionButtonTheme: FloatingActionButtonThemeData( + hoverColor: colors.colorScheme.onSurface, elevation: 0, enableFeedback: false, hoverElevation: 24, @@ -76,6 +77,16 @@ ThemeData getTheme(CustomColors colors) { ), elevatedButtonTheme: ElevatedButtonThemeData( style: ButtonStyle( + foregroundColor: MaterialStateProperty.resolveWith((states) { + if (states.contains(MaterialState.disabled)) { + return colors.colorScheme.surface; + } + return null; + }), + backgroundColor: MaterialStateProperty.resolveWith((states) { + if (states.contains(MaterialState.disabled)) return colors.hintColor; + return null; + }), textStyle: MaterialStateProperty.resolveWith((states) => const TextStyle( fontSize: 18,