StreamBatchListener<T> constructor

StreamBatchListener<T>(
  1. Stream<T> stream
)

Implementation

StreamBatchListener(this.stream) {
  _subscription = stream.listen(
    (e) {
      _add(_DataEvent(e));
    },
    onError: (e, stack) => _add(_ErrorEvent(e, stack)),
    onDone: () => _add(_DoneEvent()),
  );
}