BMFReverseGeoCodeSearchResult.fromMap constructor Null safety
- Map map
map => BMFReverseGeoCodeSearchResult
Implementation
BMFReverseGeoCodeSearchResult.fromMap(Map map)
: assert(
map != null, // ignore: unnecessary_null_comparison
'Construct a BMFReverseGeoCodeSearchResult,The parameter map cannot be null !') {
location =
map['location'] == null ? null : BMFCoordinate.fromMap(map['location']);
address = map['address'];
businessCircle = map['businessCircle'];
addressDetail = map['addressDetail'] == null
? null
: BMFAddressComponent.fromMap(map['addressDetail']);
confidence = map['confidence'];
if (map['poiList'] != null) {
List<BMFPoiInfo> tmpPoiList = [];
map['poiList'].forEach((v) {
tmpPoiList.add(BMFPoiInfo.fromMap(v as Map));
});
poiList = tmpPoiList;
}
if (map['poiRegions'] != null) {
List<BMFSearchRGCRegionInfo> tmpPoiRegions = [];
map['poiRegions'].forEach((v) {
tmpPoiRegions.add(BMFSearchRGCRegionInfo.fromMap(v as Map));
});
poiRegions = tmpPoiRegions;
}
sematicDescription = map['sematicDescription'];
}