Notification<T> class

A class that encapsulates the Kind of event, value of the event in case of onData, or the Error in the case of onError. A container object that wraps the Kind of event (OnData, OnDone, OnError), and the item or error that was emitted. In the case of onDone, no data is emitted as part of the Notification.

Constructors

Notification(Kind kind, T value, dynamic error, StackTrace stackTrace)
Constructs a Notification which, depending on the kind, wraps either value, or error and stackTrace, or neither if it is just a Kind.OnData event.
Notification.onData(T value)
Constructs a Notification with Kind.OnData and wraps a value
factory
Notification.onDone()
Constructs a Notification with Kind.OnDone
factory
Notification.onError(dynamic error, StackTrace stackTrace)
Constructs a Notification with Kind.OnError and wraps an error and stackTrace
factory

Properties

error → dynamic
The wrapped error, if applicable
final
hashCode → int
The hash code for this object. [...]
read-only
isOnData → bool
A test to determine if this Notification wraps an onData event
read-only
isOnDone → bool
A test to determine if this Notification wraps an onDone event
read-only
isOnError → bool
A test to determine if this Notification wraps an error event
read-only
kind Kind
References the Kind of this Notification event.
final
stackTrace → StackTrace
The wrapped stackTrace, if applicable
final
value → T
The wrapped value, if applicable
final
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toString() → String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited

Operators

operator ==(Object other) → bool
The equality operator. [...]