stream property

  1. @override
Stream<T> stream
override

The stream that this controller is controlling.

Implementation

@override
Stream<T> get stream async* {
  /// return _buffer.stream();
  await for (final element in _streamController.stream) {
    _count--;

    if (_count < _limit && !_spaceAvailable.isCompleted) {
      /// notify that we have space available
      _spaceAvailable.complete(true);
    }
    yield element;
  }
}