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>(
|
return showModalBottomSheet<T>(
|
||||||
context: context,
|
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,
|
useRootNavigator: useRootNavigator,
|
||||||
isDismissible: isDismissible,
|
isDismissible: isDismissible,
|
||||||
isScrollControlled: isScrollControlled,
|
isScrollControlled: isScrollControlled,
|
||||||
constraints: BoxConstraints(
|
|
||||||
maxHeight: min(MediaQuery.sizeOf(context).height - 32, 600),
|
|
||||||
),
|
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue