showLevitModalBottomSheet<T> function
Future<T?>
showLevitModalBottomSheet<T>({
- required BuildContext context,
- required WidgetBuilder builder,
- Color? backgroundColor,
- String? barrierLabel,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- BoxConstraints? constraints,
- Color? barrierColor,
- bool isScrollControlled = false,
- double scrollControlDisabledMaxHeightRatio = 9.0 / 16.0,
- bool isDismissible = true,
- bool enableDrag = true,
- bool? showDragHandle,
- bool useSafeArea = false,
- RouteSettings? routeSettings,
- AnimationController? transitionAnimationController,
- Offset? anchorPoint,
Shows a modal bottom sheet that keeps access to the nearest Levit scope.
Wraps the sheet content with LScope.capture so context.levit.find still
resolves page- or app-local dependencies inside the overlay route.
Implementation
Future<T?> showLevitModalBottomSheet<T>({
required BuildContext context,
required WidgetBuilder builder,
Color? backgroundColor,
String? barrierLabel,
double? elevation,
ShapeBorder? shape,
Clip? clipBehavior,
BoxConstraints? constraints,
Color? barrierColor,
bool isScrollControlled = false,
double scrollControlDisabledMaxHeightRatio = 9.0 / 16.0,
bool useRootNavigator = false,
bool isDismissible = true,
bool enableDrag = true,
bool? showDragHandle,
bool useSafeArea = false,
RouteSettings? routeSettings,
AnimationController? transitionAnimationController,
Offset? anchorPoint,
}) {
return showModalBottomSheet<T>(
context: context,
backgroundColor: backgroundColor,
barrierLabel: barrierLabel,
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
constraints: constraints,
barrierColor: barrierColor,
isScrollControlled: isScrollControlled,
scrollControlDisabledMaxHeightRatio: scrollControlDisabledMaxHeightRatio,
useRootNavigator: useRootNavigator,
isDismissible: isDismissible,
enableDrag: enableDrag,
showDragHandle: showDragHandle,
useSafeArea: useSafeArea,
routeSettings: routeSettings,
transitionAnimationController: transitionAnimationController,
anchorPoint: anchorPoint,
builder: (_) => LScope.capture(
context,
child: Builder(builder: builder),
),
);
}