showModal<T> method
Future<T?>
showModal<T>({
- required Widget child,
- Color? backgroundColor,
- Color? barrierColor,
- Clip? clipBehavior,
- double? elevation,
- bool enableDrag = false,
- bool isDismissible = true,
- bool isScrollControlled = false,
- RouteSettings? routeSettings,
- ShapeBorder? shape,
- AnimationController? transitionAnimationController,
- BoxConstraints? constraints,
Shows a modal material design bottom sheet.
Implementation
Future<T?> showModal<T>({
required Widget child,
Color? backgroundColor,
Color? barrierColor,
Clip? clipBehavior,
double? elevation,
bool enableDrag = false,
bool isDismissible = true,
bool isScrollControlled = false,
RouteSettings? routeSettings,
ShapeBorder? shape,
AnimationController? transitionAnimationController,
bool useRootNavigator = false,
BoxConstraints? constraints,
}) async =>
showModalBottomSheet(
context: this,
builder: (_) => child,
backgroundColor: backgroundColor,
barrierColor: barrierColor,
clipBehavior: clipBehavior,
elevation: elevation,
enableDrag: enableDrag,
isDismissible: isDismissible,
isScrollControlled: isScrollControlled,
routeSettings: routeSettings,
shape: shape,
transitionAnimationController: transitionAnimationController,
useRootNavigator: useRootNavigator,
constraints: constraints,
);