i’ve an issue with flutter i couldn’t resolve it i attempted to scrub flutter and restart pc the whole lot however nonetheless i’ve this error.
(https://i.sstatic.internet/6Hg3g2EB.png)
Future getCurrentCity() async {
attempt {
Place place = await getLocation();
Listing placemarks = await placemarkFromCoordinates(place.latitude, place.longitude);
return placemarks[0].locality ?? "";
} catch (e) {
// Deal with errors like companies not enabled, and so forth.
throw Exception('Did not get present metropolis: $e');
}
}
Future _handleLocationPermissions() async {
LocationPermission permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
permission = await Geolocator.requestPermission();
}
if (permission == LocationPermission.deniedForever || permission == LocationPermission.denied) {
// Deal with case the place permissions are denied
throw Exception('Location permissions are denied');
}
}
}
````
im new for flutter env so i cant resolve this i attempted so some ways however nonetheless nothing occurs