onLocationChanged method

Stream<Map<String, Object>> onLocationChanged()

Implementation

Stream<Map<String, Object>> onLocationChanged() {
  if (_receiveStream == null) {
    _receiveStream = StreamController();
    _subscription = _onLocationChanged.listen((Map<String, Object> event) {
      if (event['pluginKey'] == _pluginKey) {
        Map<String, Object> newEvent = Map<String, Object>.of(event);
        newEvent.remove('pluginKey');
        _receiveStream?.add(newEvent);
      }
    });
  }
  return _receiveStream!.stream;
}