showBottomSheet<T> static method

Future<T?> showBottomSheet<T>({
  1. required BuildContext context,
  2. required Widget child,
  3. Color? backgroundColor,
  4. bool isScrollControlled = false,
  5. bool wrap = true,
  6. BorderRadius borderRadius = BorderRadius.zero,
  7. double? elevation,
  8. ShapeBorder? shape,
  9. Clip? clipBehavior,
  10. BoxConstraints? constraints,
  11. Color? barrierColor,
  12. bool useRootNavigator = false,
  13. bool isDismissible = true,
  14. bool enableDrag = true,
  15. RouteSettings? routeSettings,
  16. AnimationController? transitionAnimationController,
  17. Offset? anchorPoint,
})

Implementation

static Future<T?> showBottomSheet<T>({
  required BuildContext context,
  required Widget child,
  Color? backgroundColor,
  bool isScrollControlled = false,
  bool wrap = true,
  BorderRadius borderRadius = BorderRadius.zero,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Color? barrierColor,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
  Offset? anchorPoint,
}) {
  return showModalBottomSheet<T>(
    context: context,
    enableDrag: enableDrag,
    isScrollControlled: isScrollControlled,
    backgroundColor: backgroundColor ?? context.theme.cardColor,
    shape: RoundedRectangleBorder(borderRadius: borderRadius),
    elevation: elevation,
    clipBehavior: clipBehavior,
    constraints: constraints,
    isDismissible: isDismissible,
    transitionAnimationController: transitionAnimationController,
    anchorPoint: anchorPoint,
    builder: (context) => wrap
        ? Wrap(
            children: [child],
          )
        : child,
  );
}