showBottomSheet<T> static method

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

Implementation

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