getResultsByQuery method
Implementation
Future<List<Feature>> getResultsByQuery(
LatLng proximity, String query) async {
if (query.isEmpty) return [];
final String url = '${Environment.placesBaseUrl}/$query.json';
final resp = await _dioPlaces.get(url, queryParameters: {
'proximity': '${proximity.longitude},${proximity.latitude}',
'limit': 6
});
final PlacesResponse placesResponse = PlacesResponse.fromJson(resp.data);
return placesResponse.features;
}