The target of a Stream.transform call.

The Stream.transform call will pass itself to this object and then return the resulting stream.

It is good practice to write transformers that can be used multiple times.

Implemented by

Constructors

StreamTransformer(StreamSubscription transformer(Stream<S> stream, bool cancelOnError))
const

Creates a StreamTransformer.

StreamTransformer.fromHandlers({void handleData(S data, EventSink<T> sink), void handleError(Object error, StackTrace stackTrace, EventSink<T> sink), void handleDone(EventSink<T> sink)})

Creates a StreamTransformer that delegates events to the given functions.

Methods

bind(Stream<S> stream) → Stream<T>

Transform the incoming stream's events.