Lyokone / flutterlocation

A Flutter plugin to easily handle realtime location in iOS and Android. Provides settings for optimizing performance or battery.
MIT License
1.11k stars 816 forks source link

Package stucks when iOS Precise location checkbox is unchecked #815

Open elmar001 opened 1 year ago

elmar001 commented 1 year ago

IOS location permission window has a Precise location checkbox on the same window. If that checkbox is unchecked no matter what type of permission granted nothing works. It cannot check permission or return location details. Tested with iOS 16.1.1 running iPhone 8 and iPhone XS. Should not it still return permission type at least?

elmar001 commented 1 year ago

Seems like Geolocator has that capability to handle it:

final accuracyStatus = await Geolocator.getLocationAccuracy(); switch(accuracyStatus) { case LocationAccuracyStatus.reduced: // Precise location switch is OFF. break; case LocationAccuracyStatus.precise: // Precise location switch is ON. break; case LocationAccuracyStatus.unknown: // The platform doesn't support this feature, for example an Android device. break; }

Source: https://stackoverflow.com/a/70167786/2976879