DoStreamTransformer<S> constructor
DoStreamTransformer<S> ({
- FutureOr<
void> onCancel()?, - void onData(
- S event
- void onDone()?,
- void onEach(
- Notification<
S> notification
- Notification<
- void onError()?,
- void onListen()?,
- void onPause()?,
- void onResume()?,
Constructs a StreamTransformer which will trigger any of the provided handlers as they occur.
Implementation
DoStreamTransformer(
{this.onCancel,
this.onData,
this.onDone,
this.onEach,
this.onError,
this.onListen,
this.onPause,
this.onResume}) {
if (onCancel == null &&
onData == null &&
onDone == null &&
onEach == null &&
onError == null &&
onListen == null &&
onPause == null &&
onResume == null) {
throw ArgumentError('Must provide at least one handler');
}
}