SearchResults constructor
SearchResults(
- List jsonData
Implementation
SearchResults(List<dynamic> jsonData) {
_locations = [];
for (dynamic location in jsonData) {
LocationResultData result = LocationResultData(
location['id'],
location['name'],
location['region'],
location['country'],
location['lat'],
location['lon'],
location['url']);
_locations.add(result);
}
}