go method

void go(
  1. String routeName, {
  2. String? url,
  3. String? title,
  4. Map<String, dynamic>? arguments,
})

页面跳转 routeName 路由名称 url 如果是web页面该项必填 title h5标题 arguments 参数

Implementation

void go(String routeName, {String? url, String? title, Map<String, dynamic>? arguments}) {
  if (_goIntercept(routeName, url: url, title: title, arguments: arguments)) {
    return;
  }
  Map<String, dynamic> parameters = {"route_detection": true};
  if (!url.isEmptyString) {
    parameters["url"] = url;
  }
  if (title.isNotEmptyString) {
    parameters["title"] = title;
  }
  if (arguments != null && arguments.isNotEmpty) {
    parameters.addAll(arguments);
  }
  CloudRouteObserver.instance.navigator?.pushNamed(routeName, arguments: parameters);
}