showMaterialModalBottomSheet<T> function
Future<T?>
showMaterialModalBottomSheet<T>({
- required BuildContext context,
- required WidgetBuilder builder,
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- Color? barrierColor,
- bool bounce = false,
- bool expand = false,
- AnimationController? secondAnimation,
- Curve? animationCurve,
- bool isDismissible = true,
- bool enableDrag = true,
- Duration? duration,
- RouteSettings? settings,
- double? closeProgressThreshold,
Shows a modal material design bottom sheet.
Implementation
Future<T?> showMaterialModalBottomSheet<T>({
required BuildContext context,
required WidgetBuilder builder,
Color? backgroundColor,
double? elevation,
ShapeBorder? shape,
Clip? clipBehavior,
Color? barrierColor,
bool bounce = false,
bool expand = false,
AnimationController? secondAnimation,
Curve? animationCurve,
bool useRootNavigator = false,
bool isDismissible = true,
bool enableDrag = true,
Duration? duration,
RouteSettings? settings,
double? closeProgressThreshold,
}) async {
assert(debugCheckHasMediaQuery(context));
assert(debugCheckHasMaterialLocalizations(context));
final result = await Navigator.of(context, rootNavigator: useRootNavigator)
.push(ModalSheetRoute<T>(
builder: builder,
closeProgressThreshold: closeProgressThreshold,
containerBuilder: _materialContainerBuilder(
context,
backgroundColor: backgroundColor,
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
theme: Theme.of(context),
),
secondAnimationController: secondAnimation,
bounce: bounce,
expanded: expand,
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
isDismissible: isDismissible,
modalBarrierColor: barrierColor,
enableDrag: enableDrag,
animationCurve: animationCurve,
duration: duration,
settings: settings,
));
return result;
}