Transforms a Stream.
When a stream's Stream.transform method is invoked with a StreamTransformer, the stream calls the bind method on the provided transformer. The resulting stream is then returned from the Stream.transform method.
Conceptually, a transformer is simply a function from Stream to Stream that is encapsulated into a class.
It is good practice to write transformers that can be used multiple times.
All other transforming methods on Stream, such as Stream.map, Stream.where or Stream.expand can be implemented using Stream.transform. A StreamTransformer is thus very powerful but often also a bit more complicated to use.
onListen callback. [...]
bind callback. [...]
stream. [...]
StreamTransformer<RS, RT> view of this stream transformer. [...]
source to be a StreamTransformer<TS, TT>. [...]