showCupertino<T> static method

Future<T?> showCupertino<T>({
  1. required BuildContext context,
  2. required WidgetBuilder pageBuilder,
  3. bool useNestedNavigation = false,
  4. bool enableDrag = true,
})

Position-aware wrapper for showCupertinoSheet — the iOS 26 native-style stacked-card sheet. Same probe injection.

Implementation

static Future<T?> showCupertino<T>({
  required BuildContext context,
  required WidgetBuilder pageBuilder,
  bool useNestedNavigation = false,
  bool enableDrag = true,
}) {
  return showCupertinoSheet<T>(
    context: context,
    useNestedNavigation: useNestedNavigation,
    enableDrag: enableDrag,
    // Intentionally using `builder:` even though Flutter 3.44 deprecated
    // it in favor of `scrollableBuilder`. `scrollableBuilder` doesn't
    // exist on Flutter 3.35 – 3.41.x — using it there hard-breaks the
    // package (Issue #61). `builder:` compiles on every Flutter that has
    // `showCupertinoSheet` and remains fully functional on 3.44+ (a
    // compile-time deprecation warning only). This is the maximally
    // compatible API surface until we drop <3.44 support.
    // ignore: deprecated_member_use
    builder: (ctx) => CNSheetGeometryProbe(child: pageBuilder(ctx)),
  );
}