pushModalBottomSheet<T> static method

Future<T?> pushModalBottomSheet<T>(
  1. BuildContext context,
  2. Widget child, {
  3. Color? backgroundColor,
  4. double? elevation,
  5. ShapeBorder? shape,
  6. Clip? clipBehavior,
  7. BoxConstraints? constraints,
  8. Color? barrierColor,
  9. bool isScrollControlled = false,
  10. bool useRootNavigator = false,
  11. bool isDismissible = true,
  12. bool enableDrag = true,
  13. bool? showDragHandle,
  14. bool useSafeArea = false,
  15. RouteSettings? routeSettings,
  16. AnimationController? transitionAnimationController,
  17. Offset? anchorPoint,
})

Implementation

static Future<T?> pushModalBottomSheet<T>(
  BuildContext context,
  Widget child, {
  Color? backgroundColor,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Color? barrierColor,
  bool isScrollControlled = false,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  bool? showDragHandle,
  bool useSafeArea = false,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
  Offset? anchorPoint,
}) {
  final WidgetWrapper? widgetWrapper = _getAppRouterDelegate(context).bottomSheetWrapper;
  if (null != widgetWrapper) {
    child = widgetWrapper.call(child);
  }
  return _push<T>(
    context,
    child,
    block: (delegate, child) async {
      delegate.dialogState.onPushModalBottomSheet(child);
      T? result = await showModalBottomSheet<T>(
        context: context,
        builder: (context) => child,
        backgroundColor: backgroundColor ?? Colors.transparent,
        elevation: elevation,
        shape: shape,
        clipBehavior: clipBehavior,
        constraints: constraints,
        barrierColor: barrierColor,
        isScrollControlled: isScrollControlled,
        useRootNavigator: useRootNavigator,
        isDismissible: isDismissible,
        enableDrag: enableDrag,
        showDragHandle: showDragHandle,
        useSafeArea: useSafeArea,
        routeSettings: routeSettings,
        transitionAnimationController: transitionAnimationController,
        anchorPoint: anchorPoint,
      );
      result ??= _resultTemp[child];
      return result;
    },
  );
}