addCupertinoPageRoute static method

void addCupertinoPageRoute(
  1. String name,
  2. RouteWidgetBuilder builder, {
  3. bool? maintainState = true,
  4. bool? fullscreenDialog = false,
  5. bool? allowSnapshotting = true,
  6. bool? barrierDismissible = false,
})

添加 CupertinoPageRoute

Implementation

static void addCupertinoPageRoute(
  String name,
  RouteWidgetBuilder builder, {
  bool? maintainState = true,
  bool? fullscreenDialog = false,
  bool? allowSnapshotting = true,
  bool? barrierDismissible = false,
}) {
  RouteOptions routeOptions = RouteOptions(
      builder,
      CupertinoPageRouteOptions(
        maintainState: maintainState,
        fullscreenDialog: fullscreenDialog,
        allowSnapshotting: allowSnapshotting,
        barrierDismissible: barrierDismissible,
      ));
  RouterManager.routes.putIfAbsent(name, () => routeOptions);
}