chore: Simplify adaptive bottom sheet code
This commit is contained in:
parent
dbf6b372be
commit
f8bb996622
2 changed files with 1 additions and 14 deletions
|
|
@ -146,7 +146,6 @@ class _StartPollBottomSheetState extends State<StartPollBottomSheet> {
|
|||
),
|
||||
title: Text(L10n.of(context).allowMultipleAnswers),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
ElevatedButton(
|
||||
onPressed: !isLoading && _canCreate ? _createPoll : null,
|
||||
child: isLoading
|
||||
|
|
|
|||
|
|
@ -40,25 +40,13 @@ Future<T?> showAdaptiveBottomSheet<T>({
|
|||
|
||||
return showModalBottomSheet<T>(
|
||||
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,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue