getInformationCoors method

Future<Feature> getInformationCoors(
  1. LatLng coors
)

Implementation

Future<Feature> getInformationCoors(LatLng coors) async {
  final String url =
      '${Environment.placesBaseUrl}/${coors.longitude},${coors.latitude}.json';
  final resp = await _dioPlaces.get(url, queryParameters: {'limit': 1});

  final PlacesResponse placesResponse = PlacesResponse.fromJson(resp.data);

  return placesResponse.features.first;
}