Wednesday, September 10, 2025
HomeiOS Developmentios - Flutter Denied Permission Errors

ios – Flutter Denied Permission Errors


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

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments