placeGeocoding method
Decode place from place id https://developers.google.com/maps/documentation/geocoding/requests-places-geocoding
Implementation
Future<GoogleGeocodingResponse> placeGeocoding(
String placeId, {
String? language,
String? resultType,
String? region,
String? locationType,
}) async {
final Map<String, dynamic> query = <String, dynamic>{
'place_id': placeId,
if (language != null) 'language': language,
if (resultType != null) 'result_type': resultType,
if (locationType != null) 'location_type': locationType,
if (region != null) 'region': region,
};
final Response<Map<String, dynamic>> response =
await _dio.get<Map<String, dynamic>>(
_baseUrl,
queryParameters: query,
);
return _mapOrThrow(response.data!);
}