PoiResult.fromJson constructor
PoiResult.fromJson(
- Map<String, dynamic> json
)
Implementation
PoiResult.fromJson(Map<String, dynamic> json) {
pageCount = json['pageCount'];
if (json['bound'] != null) {
bound = SearchBound.fromJson(json['bound']);
}
if (json['pois'] != null) {
pois = [];
json['pois'].forEach((v) {
pois?.add(PoiItem.fromJson(v));
});
}
query = json['query'] != null ? Query.fromJson(json['query']) : null;
if (json['searchSuggestionCitys'] != null) {
searchSuggestionCitys = [];
json['searchSuggestionCitys'].forEach((v) {
searchSuggestionCitys?.add(SuggestionCity.fromJson(v));
});
}
if (json['searchSuggestionKeywords'] != null) {
searchSuggestionKeywords = [];
json['searchSuggestionKeywords'].forEach((v) {
searchSuggestionKeywords?.add(v);
});
}
}