diff --git a/lib/theme.dart b/lib/theme.dart index 5b35216..bff577d 100644 --- a/lib/theme.dart +++ b/lib/theme.dart @@ -20,7 +20,7 @@ Future createAppThemeSet({Color? seedColorOverride, bool? useMaterial3 Future createAppTheme( Brightness brightness, { - Color? seedColorOverride, + Color? seedColorOverride, bool? useMaterial3, }) async { final prefs = await SharedPreferences.getInstance(); @@ -34,9 +34,10 @@ Future createAppTheme( ); final hasAppBarBlurry = prefs.getBool(kAppbarTransparentStoreKey) ?? false; + final useM3 = useMaterial3 ?? (prefs.getBool(kMaterialYouToggleStoreKey) ?? true); return ThemeData( - useMaterial3: useMaterial3 ?? (prefs.getBool(kMaterialYouToggleStoreKey) ?? true), + useMaterial3: useM3, colorScheme: colorScheme, brightness: brightness, iconTheme: IconThemeData( @@ -45,6 +46,9 @@ Future createAppTheme( opticalSize: 20, color: colorScheme.onSurface, ), + snackBarTheme: SnackBarThemeData( + behavior: useM3 ? SnackBarBehavior.floating : SnackBarBehavior.fixed, + ), appBarTheme: AppBarTheme( centerTitle: true, elevation: hasAppBarBlurry ? 0 : null,