MaterializeStreamTransformer<S> class
Converts the onData, on Done, and onError events into Notification
objects that are passed into the downstream onData listener.
The Notification
object contains the Kind 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 Notification
.
Example
Stream<int>.fromIterable([1])
.transform(MaterializeStreamTransformer())
.listen((i) => print(i)); // Prints onData & onDone Notification
- Inheritance
-
- Object
- StreamTransformerBase<
S, Notification< S> > - MaterializeStreamTransformer
Constructors
- MaterializeStreamTransformer()
-
Constructs a StreamTransformer which transforms the onData, on Done,
and onError events into
Notification
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<Notification< 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