showCCupertinoDialog<T> function

Future<T?> showCCupertinoDialog<T>({
  1. required BuildContext context,
  2. required WidgetBuilder builder,
  3. Cancellable? cancellable,
  4. String? barrierLabel,
  5. bool useRootNavigator = true,
  6. bool barrierDismissible = false,
  7. RouteSettings? routeSettings,
  8. Offset? anchorPoint,
})

Implementation

Future<T?> showCCupertinoDialog<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  Cancellable? cancellable,
  String? barrierLabel,
  bool useRootNavigator = true,
  bool barrierDismissible = false,
  RouteSettings? routeSettings,
  Offset? anchorPoint,
}) {
  final navigator = Navigator.of(context, rootNavigator: useRootNavigator);

  final route = CupertinoDialogRoute<T>(
    builder: builder,
    context: context,
    barrierDismissible: barrierDismissible,
    barrierLabel: barrierLabel,
    barrierColor:
        CupertinoDynamicColor.resolve(kCupertinoModalBarrierColor, context),
    settings: routeSettings,
    anchorPoint: anchorPoint,
  );
  return navigator.pushCancellableRoute(route, cancellable);
}