StreamBatchListener<T> constructor
StreamBatchListener<T> (
- Stream<
T> stream
Implementation
StreamBatchListener(this.stream) {
_subscription = stream.listen(
(e) {
_add(_DataEvent(e));
},
onError: (e, stack) => _add(_ErrorEvent(e, stack)),
onDone: () => _add(_DoneEvent()),
);
}