StreamSinkTransformer<S, T> class

A StreamSinkTransformer transforms the events being passed to a sink.

This works on the same principle as a StreamTransformer. Each transformer defines a bind method that takes in the original StreamSink and returns the transformed version. However, where a StreamTransformer transforms events after they leave the stream, this transforms them before they enter the sink.

Transformers must be able to have bind called used multiple times.

Constructors

StreamSinkTransformer.fromHandlers({void handleData(S data, EventSink<T> sink), void handleError(Object error, StackTrace stackTrace, EventSink<T> sink), void handleDone(EventSink<T> sink) })
Creates a StreamSinkTransformer that delegates events to the given handlers. [...]
factory
StreamSinkTransformer.fromStreamTransformer(StreamTransformer<S, T> transformer)
Creates a StreamSinkTransformer that transforms events and errors using transformer. [...]
const
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

bind(StreamSink<T> sink) StreamSink<S>
Transforms the events passed to sink. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Methods

typed<S, T>(StreamSinkTransformer transformer) StreamSinkTransformer<S, T>
Creates a wrapper that coerces the type of transformer. [...]