OkHiLocation.fromMap constructor
OkHiLocation.fromMap(
- Map<String, dynamic> data
)
Implementation
OkHiLocation.fromMap(Map<String, dynamic> data) {
id = data.containsKey("id") ? data["id"] : null;
lat = data.containsKey("geo_point") ? data["geo_point"]["lat"] : null;
lon = data.containsKey("geo_point") ? data["geo_point"]["lon"] : null;
city = data.containsKey("city") ? data["city"] : null;
country = data.containsKey("country") ? data["country"] : null;
directions = data.containsKey("directions") ? data["directions"] : null;
displayTitle =
data.containsKey("display_title") ? data["display_title"] : null;
otherInformation = data.containsKey("other_information")
? data["other_information"]
: null;
photoUrl = data.containsKey("photo") ? data["photo"] : null;
placeId = data.containsKey("place_id") ? data["place_id"] : null;
plusCode = data.containsKey("plus_code") ? data["plus_code"] : null;
propertyName =
data.containsKey("property_name") ? data["property_name"] : null;
propertyNumber =
data.containsKey("property_number") ? data["property_number"] : null;
state = data.containsKey("state") ? data["state"] : null;
streetName = data.containsKey("street_name") ? data["street_name"] : null;
streetViewPanoId =
data.containsKey("street_view") ? data["street_view"]["pano_id"] : null;
streetViewPanoUrl =
data.containsKey("street_view") ? data["street_view"]["url"] : null;
subtitle = data.containsKey("subtitle") ? data["subtitle"] : null;
title = data.containsKey("title") ? data["title"] : null;
url = data.containsKey("url") ? data["url"] : null;
userId = data.containsKey("user_id") ? data["user_id"] : null;
neighborhood =
data.containsKey("neighborhood") ? data["neighborhood"] : null;
countryCode =
data.containsKey("country_code") ? data["country_code"] : null;
usageTypes =
(data.containsKey("usage_types") ? data["usage_types"] as List : [])
.cast<String>();
}