StartWithErrorStreamTransformer<S> class
Prepends an error to the source Stream.
Example
Stream.fromIterable([2])
.transform(StartWithErrorStreamTransformer('error'))
.listen(null, onError: (e) => print(e)); // prints 'error'
- Inheritance
-
- Object
- StreamTransformerBase<
S, S> - StartWithErrorStreamTransformer
Constructors
- StartWithErrorStreamTransformer(Object error, [StackTrace? stackTrace])
-
Constructs a StreamTransformer which starts with the provided
error
and then outputs all events from the source Stream.
Properties
- error → Object
-
The starting error of this Stream
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The starting stackTrace of this Stream
final
Methods
-
bind(
Stream< S> stream) → Stream<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