From 09f96e48d1223fe333a34954e6d482e2c8606c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Mon, 17 Nov 2025 13:51:19 +0100 Subject: [PATCH] fix: Make keyboard moving bottom sheet up --- lib/utils/adaptive_bottom_sheet.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/utils/adaptive_bottom_sheet.dart b/lib/utils/adaptive_bottom_sheet.dart index c686471dd..7681e54f7 100644 --- a/lib/utils/adaptive_bottom_sheet.dart +++ b/lib/utils/adaptive_bottom_sheet.dart @@ -40,13 +40,20 @@ Future showAdaptiveBottomSheet({ return showModalBottomSheet( context: context, - builder: builder, + builder: (context) => ConstrainedBox( + constraints: BoxConstraints( + maxHeight: MediaQuery.viewInsetsOf(context).bottom + + min( + MediaQuery.sizeOf(context).height - 32, + 600, + ), + ), + child: builder(context), + ), + useSafeArea: true, useRootNavigator: useRootNavigator, isDismissible: isDismissible, isScrollControlled: isScrollControlled, - constraints: BoxConstraints( - maxHeight: min(MediaQuery.sizeOf(context).height - 32, 600), - ), clipBehavior: Clip.hardEdge, ); }