From be019d86960042755362a72938a3d84da0f5bbcb Mon Sep 17 00:00:00 2001 From: Frederik Feichtmeier Date: Tue, 15 Aug 2023 15:04:21 +0200 Subject: [PATCH] fix: set default size for snackbars (#389) Fixes #388 --- lib/src/themes/common_themes.dart | 1 + lib/src/themes/constants.dart | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/src/themes/common_themes.dart b/lib/src/themes/common_themes.dart index 79d864bc1..85707cc17 100644 --- a/lib/src/themes/common_themes.dart +++ b/lib/src/themes/common_themes.dart @@ -622,6 +622,7 @@ SnackBarThemeData _createSnackBarTheme(ColorScheme colorScheme) { final light = colorScheme.brightness == Brightness.light; const fg = Colors.white; return SnackBarThemeData( + width: kSnackBarWidth, backgroundColor: const Color.fromARGB(255, 20, 20, 20).withOpacity(0.8), closeIconColor: fg, actionTextColor: Colors.white, diff --git a/lib/src/themes/constants.dart b/lib/src/themes/constants.dart index 84048a47d..33259b766 100644 --- a/lib/src/themes/constants.dart +++ b/lib/src/themes/constants.dart @@ -6,6 +6,7 @@ const kCompactAppBarHeight = 46.0; const kComfortableAppBarHeight = 56.0; const kCompactNavigationBarHeight = 64.0; const kComfortableNavigationBarHeight = 74.0; +const kSnackBarWidth = 350.0; const kCompactButtonHeight = 34.0; const kComfortableButtonHeight = 44.0;