StreamListenerMixin mixin

Mixin which enables multiple stream subscriptions and exposes overrides for onData, onError, and onDone callbacks.

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

cancel() → void
Cancels all existing StreamSubscriptions. If subscribe is invoked, then cancel should also be invoked when subscriptions are no longer needed.
cancelOnError(Stream stream) bool
Flag to determine whether or not to cancel the subscription if an error is emitted. Defaults to false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onData(Stream stream, dynamic data) → void
Invoked for each data event from the stream.
onDone(Stream stream) → void
Invoked if the stream closes.
onError(Stream stream, dynamic error, StackTrace stackTrace) → void
Invoked on stream errors with the error object and possibly a stack trace.
subscribe(Stream stream) → void
Invokes Stream.listen on the provided Stream and propagates emitted data to the onData, onError, and onDone methods.
toString() String
A string representation of this object.
inherited

Operators

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