addressSuggestion function
Implementation
Future<List<SearchInfo>> addressSuggestion(String searchText,
{int limitInformation = 5, String locale = ""}) async {
Response response = await Dio().get(
"https://photon.komoot.io/api/",
queryParameters: {
"q": searchText,
"limit": limitInformation == 0 ? "" : "$limitInformation",
"lang": locale
},
);
final json = response.data;
return (json["features"] as List)
.map((d) => SearchInfo.fromPhotonAPI(d))
.toList();
}