auto_height_bottom_sheet library
A modal bottom sheet whose height adapts to content and keyboard.
Use showAutoHeightBottomSheet to display a bottom sheet, and AutoHeightSheet as the content widget. The sheet height follows its content, avoids extra rebuilds common with showModalBottomSheet, and shifts with the keyboard so inputs are not covered.
Classes
- AutoHeightSheet
- A bottom sheet content widget whose height adapts to its content.
Functions
-
showAutoHeightBottomSheet<
T> ({required BuildContext context, required WidgetBuilder builder, String? barrierLabel, Color? barrierColor, bool enableDrag = true, bool useSafeArea = false, RouteSettings? routeSettings, AnimationController? transitionAnimationController, Offset? anchorPoint, AnimationStyle? sheetAnimationStyle, bool? requestFocus}) → Future< T?> -
The
contextargument is used to look up the Navigator and Theme for the bottom sheet. It is only used when the method is called. Its corresponding widget can be safely removed from the tree before the bottom sheet is closed.