From b80962fba76aa0cb964c26c72562c925aec3e77c Mon Sep 17 00:00:00 2001 From: Krille Date: Fri, 24 Jan 2025 13:45:19 +0100 Subject: [PATCH] chore: Follow up snackbar theme --- lib/config/themes.dart | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/config/themes.dart b/lib/config/themes.dart index 89d49ba779..967b9f4e13 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -67,6 +67,7 @@ abstract class FluffyThemes { brightness: brightness, seedColor: seed ?? AppConfig.colorSchemeSeed ?? AppConfig.primaryColor, ); + final isColumnMode = FluffyThemes.isColumnMode(context); return ThemeData( visualDensity: VisualDensity.standard, useMaterial3: true, @@ -95,14 +96,11 @@ abstract class FluffyThemes { filled: false, ), appBarTheme: AppBarTheme( - toolbarHeight: FluffyThemes.isColumnMode(context) ? 72 : 56, - shadowColor: FluffyThemes.isColumnMode(context) - ? colorScheme.surfaceContainer.withAlpha(128) - : null, - surfaceTintColor: - FluffyThemes.isColumnMode(context) ? colorScheme.surface : null, - backgroundColor: - FluffyThemes.isColumnMode(context) ? colorScheme.surface : null, + toolbarHeight: isColumnMode ? 72 : 56, + shadowColor: + isColumnMode ? colorScheme.surfaceContainer.withAlpha(128) : null, + surfaceTintColor: isColumnMode ? colorScheme.surface : null, + backgroundColor: isColumnMode ? colorScheme.surface : null, systemOverlayStyle: SystemUiOverlayStyle( statusBarColor: Colors.transparent, statusBarIconBrightness: brightness.reversed, @@ -123,9 +121,9 @@ abstract class FluffyThemes { ), ), ), - snackBarTheme: const SnackBarThemeData( + snackBarTheme: SnackBarThemeData( behavior: SnackBarBehavior.floating, - width: FluffyThemes.columnWidth * 1.5, + width: isColumnMode ? null : FluffyThemes.columnWidth * 1.5, ), elevatedButtonTheme: ElevatedButtonThemeData( style: ElevatedButton.styleFrom(