createGestureBottomUpModalDelegate<T> function

ShowGestureRouteDelegate<T> createGestureBottomUpModalDelegate<T>({
  1. required BuildContext context,
  2. required WidgetBuilder builder,
  3. Color? backgroundColor,
  4. double? elevation,
  5. ShapeBorder? shape,
  6. Clip? clipBehavior,
  7. BoxConstraints? constraints,
  8. Color? barrierColor,
  9. bool useRootNavigator = false,
  10. bool isDismissible = true,
  11. RouteSettings? routeSettings,
})

Implementation

ShowGestureRouteDelegate<T> createGestureBottomUpModalDelegate<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  Color? backgroundColor,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Color? barrierColor,
  bool useRootNavigator = false,
  bool isDismissible = true,
  RouteSettings? routeSettings,
}) {
  assert(debugCheckHasMediaQuery(context));
  assert(debugCheckHasMaterialLocalizations(context));

  return (GestureRouteDelegate<T> gestureDelegate) {
    final NavigatorState navigator = Navigator.of(context, rootNavigator: useRootNavigator);
    return navigator.push(GestureModalBottomSheetRoute<T>(
      gestureDelegate: gestureDelegate,
      builder: builder,
      capturedThemes: InheritedTheme.capture(from: context, to: navigator.context),
      barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
      backgroundColor: backgroundColor,
      elevation: elevation,
      shape: shape,
      clipBehavior: clipBehavior,
      constraints: constraints,
      isDismissible: isDismissible,
      modalBarrierColor: barrierColor,
      settings: routeSettings,
    ));
  };
}