From f8bb996622ef7871557cbadd96e39c6acb2f3a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Mon, 17 Nov 2025 13:26:11 +0100 Subject: [PATCH] chore: Simplify adaptive bottom sheet code --- lib/pages/chat/start_poll_bottom_sheet.dart | 1 - lib/utils/adaptive_bottom_sheet.dart | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/pages/chat/start_poll_bottom_sheet.dart b/lib/pages/chat/start_poll_bottom_sheet.dart index bc05a2a6e..fd14c4186 100644 --- a/lib/pages/chat/start_poll_bottom_sheet.dart +++ b/lib/pages/chat/start_poll_bottom_sheet.dart @@ -146,7 +146,6 @@ class _StartPollBottomSheetState extends State { ), title: Text(L10n.of(context).allowMultipleAnswers), ), - const SizedBox(height: 8), ElevatedButton( onPressed: !isLoading && _canCreate ? _createPoll : null, child: isLoading diff --git a/lib/utils/adaptive_bottom_sheet.dart b/lib/utils/adaptive_bottom_sheet.dart index b39535fbf..c686471dd 100644 --- a/lib/utils/adaptive_bottom_sheet.dart +++ b/lib/utils/adaptive_bottom_sheet.dart @@ -40,25 +40,13 @@ Future showAdaptiveBottomSheet({ return showModalBottomSheet( context: context, - useSafeArea: true, - builder: (context) => Padding( - padding: EdgeInsets.zero, - child: ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(AppConfig.borderRadius / 2), - topRight: Radius.circular(AppConfig.borderRadius / 2), - ), - child: builder(context), - ), - ), + builder: builder, useRootNavigator: useRootNavigator, isDismissible: isDismissible, isScrollControlled: isScrollControlled, constraints: BoxConstraints( maxHeight: min(MediaQuery.sizeOf(context).height - 32, 600), - maxWidth: FluffyThemes.columnWidth * 1.25, ), - backgroundColor: Colors.transparent, clipBehavior: Clip.hardEdge, ); }