showCupertinoModalBottomSheet<T> function
Future<T?>
showCupertinoModalBottomSheet<T>({
- required BuildContext context,
- required WidgetBuilder builder,
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- Color? barrierColor,
- bool expand = false,
- AnimationController? secondAnimation,
- Curve? animationCurve,
- Curve? previousRouteAnimationCurve,
- bool bounce = true,
- bool? isDismissible,
- bool enableDrag = true,
- Radius topRadius = _kDefaultTopRadius,
- Duration? duration,
- RouteSettings? settings,
- Color? transitionBackgroundColor,
- BoxShadow? shadow,
- SystemUiOverlayStyle? overlayStyle,
- double? closeProgressThreshold,
Implementation
Future<T?> showCupertinoModalBottomSheet<T>({
required BuildContext context,
required WidgetBuilder builder,
Color? backgroundColor,
double? elevation,
ShapeBorder? shape,
Clip? clipBehavior,
Color? barrierColor,
bool expand = false,
AnimationController? secondAnimation,
Curve? animationCurve,
Curve? previousRouteAnimationCurve,
bool useRootNavigator = false,
bool bounce = true,
bool? isDismissible,
bool enableDrag = true,
Radius topRadius = _kDefaultTopRadius,
Duration? duration,
RouteSettings? settings,
Color? transitionBackgroundColor,
BoxShadow? shadow,
SystemUiOverlayStyle? overlayStyle,
double? closeProgressThreshold,
}) async {
assert(debugCheckHasMediaQuery(context));
final hasMaterialLocalizations =
Localizations.of<MaterialLocalizations>(context, MaterialLocalizations) !=
null;
final barrierLabel = hasMaterialLocalizations
? MaterialLocalizations.of(context).modalBarrierDismissLabel
: '';
final result =
await Navigator.of(context, rootNavigator: useRootNavigator).push(
CupertinoModalBottomSheetRoute<T>(
builder: builder,
containerBuilder: (context, _, child) => _CupertinoBottomSheetContainer(
child: child,
backgroundColor: backgroundColor,
topRadius: topRadius,
shadow: shadow,
overlayStyle: overlayStyle,
),
secondAnimationController: secondAnimation,
expanded: expand,
closeProgressThreshold: closeProgressThreshold,
barrierLabel: barrierLabel,
elevation: elevation,
bounce: bounce,
shape: shape,
clipBehavior: clipBehavior,
isDismissible: isDismissible ?? expand == false ? true : false,
modalBarrierColor: barrierColor ?? Colors.black12,
enableDrag: enableDrag,
topRadius: topRadius,
animationCurve: animationCurve,
previousRouteAnimationCurve: previousRouteAnimationCurve,
duration: duration,
settings: settings,
transitionBackgroundColor: transitionBackgroundColor ?? Colors.black,
overlayStyle: overlayStyle),
);
return result;
}