pushModalBottomSheet<T> static method
Future<T?>
pushModalBottomSheet<T>(
- BuildContext context,
- Widget child, {
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- BoxConstraints? constraints,
- Color? barrierColor,
- bool isScrollControlled = false,
- bool isDismissible = true,
- bool enableDrag = true,
- bool? showDragHandle,
- bool useSafeArea = false,
- RouteSettings? routeSettings,
- AnimationController? transitionAnimationController,
- 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;
},
);
}