Event<T> class sealed

Abstract immutable event object of type `T.

Implementers
Annotations
  • @immutable

Constructors

Event.complete()
Creates a completion event.
const
factory
Event.error(Object object, StackTrace stackTrace)
Creates an error event.
const
factory
Event.next(T value)
Creates a next event.
const
factory

Properties

error Object
Returns the error of a ErrorEvent, throws otherwise.
no setter
hashCode int
The hash code for this object.
no setterinherited
isComplete bool
Returns true, if this is a completion event.
no setter
isError bool
Returns true, if this is an event with an error and an optional stackTrace.
no setter
isNext bool
Returns true, if this is an event with a value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace
Returns the optional stack trace of a ErrorEvent, throws otherwise.
no setter
value → T
Returns the value of a NextEvent, throws otherwise.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe(Observer<T> observer) → void
Performs this event on the observer.
toString() String
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.