emitStream method

void emitStream(
  1. Stream<T> stream
)
override

Emits values of the stream

Implementation

void emitStream(Stream<T> stream) {
  if (_streamer.isClosed) return;
  late StreamSubscription sub;
  sub = stream.listen((event) {
    if (_streamer.isClosed) {
      sub.cancel();
      return;
    }
    _streamer.add(event);
  });
}