initTreeByCode method

Point initTreeByCode(
  1. String code
)

build tree by any code provinceId or cityCode or areaCode @param code build a tree @return Point a province with its cities and areas tree

Implementation

Point initTreeByCode(String code) {
  String _code = code.toString();
  if (this._provincesData[_code] != null) {
    return initTree(code);
  }
  String? provinceId = _getProvinceByCode(code);
  if (provinceId != null) {
    return initTree(provinceId);
  }
  return Point.nullPoint();
//    return Point.nullPoint;
}