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.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(Object error, StackTrace stackTrace)
-
Constructs a Notification with Kind.OnError and wraps an
error
andstackTrace
factory
Properties
- errorAndStackTrace → ErrorAndStackTrace
-
The wrapped error and stack trace, if applicable
final
- hashCode → int
-
The hash code for this object. [...]
read-only, override
- 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
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- value → T
-
The wrapped value, if applicable
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
override