Необработанное исключение: PlatformException (PERMISSION_DENIED, доступ к данным о местоположении запрещен, null) - PullRequest
0 голосов
/ 14 июля 2020
   it give the exception when i get the current  location of the user . my flutter version :-  
    v1.17.4, and  my info.plist code is given below. geolocator: ^5.3.2+2


Future<Position> locateUser() async {
  return  await Geolocator()
      .getCurrentPosition(desiredAccuracy: LocationAccuracy.low,locationPermissionLevel: 
         GeolocationPermission.location);
              }
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This app needs access to location when in the background.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs access to location when open and in the background.</string>


 
...