showModal<T> method

Future<T?> showModal<T>({
  1. required Widget child,
  2. Color? backgroundColor,
  3. Color? barrierColor,
  4. Clip? clipBehavior,
  5. double? elevation,
  6. bool enableDrag = false,
  7. bool isDismissible = true,
  8. bool isScrollControlled = false,
  9. RouteSettings? routeSettings,
  10. ShapeBorder? shape,
  11. AnimationController? transitionAnimationController,
  12. bool useRootNavigator = false,
  13. 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,
    );