chore: nicer bottom sheets

This commit is contained in:
krille-chan 2024-07-26 17:32:36 +02:00
commit d71d633cce
No known key found for this signature in database
4 changed files with 33 additions and 32 deletions

View file

@ -8,18 +8,19 @@ Future<T?> showAdaptiveBottomSheet<T>({
required Widget Function(BuildContext) builder,
bool isDismissible = true,
bool isScrollControlled = true,
double maxHeight = 480.0,
double maxHeight = 512,
bool useRootNavigator = true,
}) =>
showModalBottomSheet(
context: context,
builder: builder,
// this sadly is ugly on desktops but otherwise breaks `.of(context)` calls
useRootNavigator: false,
useRootNavigator: useRootNavigator,
isDismissible: isDismissible,
isScrollControlled: isScrollControlled,
constraints: BoxConstraints(
maxHeight: maxHeight,
maxWidth: FluffyThemes.columnWidth * 1.5,
maxWidth: FluffyThemes.columnWidth * 1.25,
),
clipBehavior: Clip.hardEdge,
shape: const RoundedRectangleBorder(