search static method
Search locations in any language globally.
| attributes | type |
|---|---|
| name | String |
| count | int? |
| language | String? |
If name attributes is empty, this function will return {}
Implementation
static Future<dynamic> search(
{required String name, int? count, String? language}) async {
if (name.isEmpty) {
return {};
}
return jsonDecode((await http.get(Uri.parse(
"https://geocoding-api.open-meteo.com/v1/search?name=$name${count != null ? "&count=$count" : ""}${language != null ? "&language=$language" : ""}")))
.body);
}