Changed enum to bool
MODIFY
geolocator_platform_interface/lib/src/enums/enums.dart
geolocator_platform_interface/lib/src/enums/enums.dart
export 'location_accuracy.dart';
export 'location_permission.dart';
\ No newline at end of file
-export 'location_service_status.dart';

DELETE
geolocator_platform_interface/lib/src/enums/location_service_status.dart
-/// Represents the possible Location Service Statuses
-enum LocationServiceStatus {
- /// Location Services are enabled on the native device
- enabled,
-
- /// Location Servies are disabled on the native device
- disabled
-}

MODIFY
geolocator_platform_interface/lib/src/geolocator_platform_interface.dart
geolocator_platform_interface/lib/src/geolocator_platform_interface.dart
@@ -110,7 +110,7 @@ abstract class GeolocatorPlatform extends PlatformInterface {
/// Fires when the Location Service is manually disabled or enabled f.e.
/// when Location Service in Settings is disabled, a event will be fired which
/// returns a [LocationServiceStatus].
- Stream<LocationServiceStatus> getServiceStatusStream() {
+ Stream<bool> getServiceStatusStream() {
throw UnimplementedError(
'getServiceStatusStream() 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
@@ -33,7 +33,7 @@ class MethodChannelGeolocator extends GeolocatorPlatform {
bool forceAndroidLocationManager = false;
Stream<Position>? _positionStream;
- Stream<LocationServiceStatus>? _serviceStatusStream;
+ Stream<bool>? _serviceStatusStream;
@override
Future<LocationPermission> checkPermission() async {
@@ -128,7 +128,7 @@ class MethodChannelGeolocator extends GeolocatorPlatform {
}
@override
- Stream<LocationServiceStatus> getServiceStatusStream() {
+ Stream<bool> getServiceStatusStream() {
if (_serviceStatusStream != null) {
return _serviceStatusStream!;
}
@@ -136,7 +136,7 @@ class MethodChannelGeolocator extends GeolocatorPlatform {
_serviceStatusEventChannel.receiveBroadcastStream();
_serviceStatusStream = serviceStatusStream
- .map((dynamic element) => element as LocationServiceStatus)
+ .map((dynamic element) => element as bool)
.handleError((error) {
_serviceStatusStream = null;
if (error is PlatformException) {

Changed enum to bool