setUnknownRoute static method

void setUnknownRoute(
  1. RouteWidgetBuilder builder
)

设置未知路由

Implementation

static void setUnknownRoute(RouteWidgetBuilder builder) {
  CustomPageRouteOptions options = CustomPageRouteOptions(
    opaque: false,
  );
  RouteOptions routeOptions = RouteOptions(builder, options);
  RouterManager.routes.putIfAbsent("UnknownRouteName", () => routeOptions);
}