showModalPopup<T> static method

Future<T?> showModalPopup<T>({
  1. required BuildContext context,
  2. required WidgetBuilder builder,
  3. ImageFilter? filter,
  4. Color? barrierColor,
  5. bool barrierDismissible = true,
  6. bool useRootNavigator = true,
  7. bool semanticsDismissible = false,
  8. RouteSettings? routeSettings,
  9. Offset? anchorPoint,
})

Position-aware wrapper for showCupertinoModalPopup — the iOS action-sheet style popup that animates up from the bottom. Same probe injection. Even though the popup is short, it's still a PlatformView container conflict source, so wrapping is worth it.

Implementation

static Future<T?> showModalPopup<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  ImageFilter? filter,
  Color? barrierColor,
  bool barrierDismissible = true,
  bool useRootNavigator = true,
  bool semanticsDismissible = false,
  RouteSettings? routeSettings,
  Offset? anchorPoint,
}) {
  return showCupertinoModalPopup<T>(
    context: context,
    filter: filter,
    barrierColor: barrierColor ?? kCupertinoModalBarrierColor,
    barrierDismissible: barrierDismissible,
    useRootNavigator: useRootNavigator,
    semanticsDismissible: semanticsDismissible,
    routeSettings: routeSettings,
    anchorPoint: anchorPoint,
    builder: (ctx) => CNSheetGeometryProbe(child: builder(ctx)),
  );
}