Skip to content

Commit

Permalink
chore: Follow up snackbar theme
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Jan 24, 2025
1 parent 43f47a2 commit b80962f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/config/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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(
Expand Down

0 comments on commit b80962f

Please sign in to comment.