serviceStatus property
Stream<ServiceStatus>
serviceStatus
Allows listening to the enabled/disabled state of the location service, currently only on Android.
This is basically the stream version of checkPermissionStatus().
Implementation
Stream<ServiceStatus> get serviceStatus {
assert(Platform.isAndroid,
'Listening to service state changes is only supported on Android.');
return _eventChannel!.receiveBroadcastStream().map((dynamic status) =>
status ? ServiceStatus.enabled : ServiceStatus.disabled);
}