postBack method

void postBack(
  1. List<String> routeNames, {
  2. String? action,
  3. Map<String, dynamic>? arguments,
})

回传数据(接收对象需要实现RouteStateNotification) routeNames 数据回传的目标路由名称 stateInstance 页面对象 arguments 回传数据

Implementation

void postBack(List<String> routeNames, {String? action, Map<String, dynamic>? arguments}) {
  if (routeNames.isEmptyList) {
    return;
  }
  routeNames.forEach((element) {
    if (element.endsWith("/")) {
      CloudRouteObserver.instance.notificationState("/", arguments ?? {}, action: action);
    } else {
      var parse = RouteUriParse(element);
      var path = parse.withoutQueryPath;
      CloudRouteObserver.instance.notificationState(path, arguments ?? {}, action: action);
    }
  });
}