onLocationChanged method
Return a stream of the user's location.
Implementation
@override
Stream<LocationData?> onLocationChanged({bool inBackground = false}) {
if (_onLocationChanged != null) {
_api.setBackgroundActivated(inBackground);
}
return _onLocationChanged ??=
_eventChannel.receiveBroadcastStream(inBackground).map<LocationData>(
(dynamic event) => LocationData.fromPigeon(
PigeonLocationData.decode(event as Object),
),
);
}