clean up colors

This commit is contained in:
zoe 2022-09-26 12:04:53 +02:00
parent f324e43be3
commit d077d9a293
1 changed files with 12 additions and 1 deletions

View File

@ -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,