show<T> static method

Future<T?> show<T>({
  1. required BuildContext context,
  2. required WidgetBuilder builder,
  3. Color? backgroundColor,
  4. String? barrierLabel,
  5. double? elevation,
  6. ShapeBorder? shape,
  7. Clip? clipBehavior,
  8. BoxConstraints? constraints,
  9. Color? barrierColor,
  10. bool isScrollControlled = false,
  11. double scrollControlDisabledMaxHeightRatio = 9.0 / 16.0,
  12. bool useRootNavigator = false,
  13. bool isDismissible = true,
  14. bool enableDrag = true,
  15. bool? showDragHandle,
  16. bool useSafeArea = false,
  17. RouteSettings? routeSettings,
  18. AnimationController? transitionAnimationController,
  19. Offset? anchorPoint,
})

Position-aware wrapper for showModalBottomSheet.

All parameters are forwarded verbatim. Inside the sheet's builder the only change is that your widget is wrapped in an invisible probe publishing live geometry — no impact on appearance, layout, or gestures.

Implementation

static Future<T?> show<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  Color? backgroundColor,
  String? barrierLabel,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Color? barrierColor,
  bool isScrollControlled = false,
  double scrollControlDisabledMaxHeightRatio = 9.0 / 16.0,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  bool? showDragHandle,
  bool useSafeArea = false,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
  Offset? anchorPoint,
}) {
  return showModalBottomSheet<T>(
    context: context,
    backgroundColor: backgroundColor,
    barrierLabel: barrierLabel,
    elevation: elevation,
    shape: shape,
    clipBehavior: clipBehavior,
    constraints: constraints,
    barrierColor: barrierColor,
    isScrollControlled: isScrollControlled,
    scrollControlDisabledMaxHeightRatio: scrollControlDisabledMaxHeightRatio,
    useRootNavigator: useRootNavigator,
    isDismissible: isDismissible,
    enableDrag: enableDrag,
    showDragHandle: showDragHandle,
    useSafeArea: useSafeArea,
    routeSettings: routeSettings,
    transitionAnimationController: transitionAnimationController,
    anchorPoint: anchorPoint,
    builder: (ctx) => CNSheetGeometryProbe(child: builder(ctx)),
  );
}