noiseStream property

Stream<NoiseReading> noiseStream

The stream of noise readings.

Implementation

Stream<NoiseReading> get noiseStream {
  if (_stream == null) {
    _controller = StreamController<NoiseReading>.broadcast(
        onListen: _start, onCancel: _stop);
    _stream = (onError != null)
        ? _controller.stream.handleError(onError!)
        : _controller.stream;
  }
  return _stream!;
}