fix: Make keyboard moving bottom sheet up
This commit is contained in:
parent
f8bb996622
commit
09f96e48d1
1 changed files with 11 additions and 4 deletions
|
|
@ -40,13 +40,20 @@ Future<T?> showAdaptiveBottomSheet<T>({
|
|||
|
||||
return showModalBottomSheet<T>(
|
||||
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,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue