finish method

void finish(
  1. String routeName
)

销毁页面 routeName 路由名称或路径

Implementation

void finish(String routeName) {
  if (routeName.isEmptyString) {
    return;
  }
  var parse = RouteUriParse(routeName);
  var path = parse.withoutQueryPath;
  var routes = CloudRouteObserver.instance.getRoutes(path);
  if (routes.isEmptyList) {
    return;
  }
  CloudRouteObserver.instance.navigator?.removeRoute(routes.last);
}