Event<T> class
Abstract immutable event object of type `T.
- Implementers
- Annotations
- @immutable
Constructors
- Event()
-
Default constructor for events.
const
- Event.complete()
-
Creates a completion event.
constfactory
- Event.error(Object object, [StackTrace stackTrace])
-
Creates an error event.
constfactory
- Event.next(T value)
-
Creates a next event.
constfactory
Properties
- error → Object
-
Returns the error of a ErrorEvent,
null
otherwise.read-only - hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- stackTrace → StackTrace
-
Returns the optional stack trace of a ErrorEvent,
null
otherwise.read-only - value → T
-
Returns the value of a NextEvent,
null
otherwise.read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
observe(
Observer< T> observer) → void -
Performs this event on the
observer
. -
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Static Methods
-
map0<
R> (Map0< R> callback) → Event<R> - Maps the evaluation of the 0-argument callback to an event.
-
map1<
R, T1> (Map1< T1, R> callback, T1 value1) → Event<R> - Maps the evaluation of the 1-argument callback to an event.
-
map2<
R, T1, T2> (Map2< T1, T2, R> callback, T1 value1, T2 value2) → Event<R> - Maps the evaluation of the 2-argument callback to an event.