Listening constructor

Listening(
  1. Stream<NewDataForListener> _parentStream,
  2. StreamController<NewDataForListener> childStreamController,
  3. String listenId,
  4. void _notifyParentStreamThatChildStreamIsNotListeningAnymore(),
)

Implementation

Listening(this._parentStream, this.childStreamController, this.listenId, this._notifyParentStreamThatChildStreamIsNotListeningAnymore){
  stream = childStreamController.stream;
  _subscription = _parentStream.listen(childStreamController.add);
  childStreamController.onCancel = close;
}