Skip to content

Commit

Permalink
snacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed May 7, 2024
1 parent 6595100 commit b3cc45e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/src/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ThemePair phoenixTheme({
navigationRailTheme: _naviRailTheme(lightScheme),
navigationBarTheme: _naviBarTheme(lightScheme),
appBarTheme: _appBarTheme(lightScheme),
snackBarTheme: _snackBarThemeData(lightScheme),
),
darkTheme: ThemeData(
colorScheme: darkScheme,
Expand All @@ -52,9 +53,10 @@ ThemePair phoenixTheme({
navigationRailTheme: _naviRailTheme(darkScheme),
navigationBarTheme: _naviBarTheme(darkScheme),
appBarTheme: _appBarTheme(darkScheme),
snackBarTheme: _snackBarThemeData(darkScheme),
cardTheme: CardTheme(
color: darkScheme.surface.scale(
lightness: 0.03,
lightness: 0.06,
),
),
)
Expand Down Expand Up @@ -259,3 +261,13 @@ AppBarTheme _appBarTheme(ColorScheme colorScheme) {
backgroundColor: colorScheme.background,
);
}

SnackBarThemeData _snackBarThemeData(ColorScheme scheme) {
return SnackBarThemeData(
behavior: SnackBarBehavior.floating,
actionTextColor: scheme.primary.scale(
saturation: 0.5,
lightness: (scheme.isLight ? 0.2 : -0.5),
),
);
}

0 comments on commit b3cc45e

Please sign in to comment.