Requested changes resolved
MODIFY
geolocator_platform_interface/CHANGELOG.md
geolocator_platform_interface/CHANGELOG.md
## 2.2.0
-- Added the possibility to query for the LocationAccuracyStatus on iOS devices
+- Added the possibility to query for the LocationAccuracyStatus on devices running iOS 14.0 and higher.
## 2.1.1

MODIFY
geolocator_platform_interface/lib/src/enums/location_accuracy_status.dart
geolocator_platform_interface/lib/src/enums/location_accuracy_status.dart
-/// Represent the current Location Accuracy Status on iOS devices
+/// Represent the current Location Accuracy Status on iOS 14.0 and higher.
enum LocationAccuracyStatus {
- /// A approximate location will be returned (Approximate location)
+ /// A approximate location will be returned (Approximate location).
reduced,
- /// The precise location of the device will be returned
+ /// The precise location of the device will be returned.
precise,
}

MODIFY
geolocator_platform_interface/lib/src/geolocator_platform_interface.dart
geolocator_platform_interface/lib/src/geolocator_platform_interface.dart
@@ -159,11 +159,12 @@ abstract class GeolocatorPlatform extends PlatformInterface {
throw UnimplementedError('getPositionStream() has not been implemented.');
}
- /// Returns a [Future] containing a [LocationAccuracyStatus]
+ /// Returns a [Future] containing a [LocationAccuracyStatus].
+ ///
/// When on iOS the user has given permission for approximate location,
/// [LocationAccuracyStatus.reduced] will be returned, if the user gave
/// permission for precise/full accuracy location, [LocationAccuracyStatus.precise]
- /// will be returned
+ /// will be returned.
Future<LocationAccuracyStatus> getLocationAccuracy() async {
throw UnimplementedError('getLocationAccuracy() has not been implemented.');
}

MODIFY
geolocator_platform_interface/lib/src/implementations/method_channel_geolocator.dart
geolocator_platform_interface/lib/src/implementations/method_channel_geolocator.dart
@@ -92,8 +92,9 @@ class MethodChannelGeolocator extends GeolocatorPlatform {
@override
Future<LocationAccuracyStatus> getLocationAccuracy() async {
- final accuracy = await _methodChannel.invokeMethod('getLocationAccuracy');
- return LocationAccuracyStatus.values[accuracy as int];
+ final int accuracy =
+ await _methodChannel.invokeMethod('getLocationAccuracy');
+ return LocationAccuracyStatus.values[accuracy];
}
@override

Requested changes resolved