VerboseStream<LE, RE> class
A stream wrapper that enforces a stream to explicitly return either
a RE
right event on data events, or a LE
left event on error events as
a replacement for the Object error.
For more info about data and error events, see Stream.
Constructors
-
VerboseStream({required Stream<
RE> stream, required LE errorConverter(Object error, StackTrace? stackTrace)}) -
A stream wrapper that enforces a stream to explicitly return either
a
RE
right event on data events, or aLE
left event on error events as a replacement for the Object error.const
Properties
- errorConverter → LE Function(Object error, StackTrace? stackTrace)
-
Converts the Object error from Stream.listen's
onError
to anLE
value.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
RE> -
The stream source of events.
final
Methods
-
listen(
void onData(RE), {void onError(LE)?, void onDone()?, bool? cancelOnError}) → StreamSubscription< RE> - Create a stream listener.
-
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