Reputation: 11
i can get location but i want to get address from this location . i use geolocator plugin and this is my _getAddress method :
_getAddress() async {
try {
List<Placemark> placeMark = await
locator.placemarkFromCoordinates(
_currentPosition.longitude,
_currentPosition.longitude);
Placemark place = placeMark[0];
setState(() {
_currentAddress =
"${place.locality}, ${place.postalCode},
${place.country}";
});
} catch (e) {
print(e);
}
}
how can i do that ?
and i have all location permissions .
this is my error from catch :
PlatformException(ERROR_GEOCODING_COORDINATES, grpc failed, null)
Upvotes: 0
Views: 297
Reputation: 1084
placemarkFromCoordinates
is no longer in the geolocator lib :
https://pub.dev/packages/geolocator
Upvotes: 1