MaterializeStreamTransformer<S> class

Converts the onData, on Done, and onError events into StreamNotification objects that are passed into the downstream onData listener.

The StreamNotification object contains the NotificationKind of event (OnData, onDone, or OnError), and the item or error that was emitted. In the case of onDone, no data is emitted as part of the StreamNotification.

Example

Stream<int>.fromIterable([1])
    .transform(MaterializeStreamTransformer())
    .listen(print); // Prints DataNotification{value: 1}, DoneNotification{}
Inheritance

Constructors

MaterializeStreamTransformer()
Constructs a StreamTransformer which transforms the onData, on Done, and onError events into StreamNotification objects.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<S> stream) Stream<StreamNotification<S>>
Transforms the provided stream.
override
cast<RS, RT>() StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited