LxStatus<T> class sealed

A sealed hierarchy representing the status of an asynchronous operation.

LxStatus provides a type-safe way to represent the standard states of asynchronous operations: LxIdle, LxWaiting, LxSuccess, and LxError. It supports "stale-while-revalidate" by optionally holding a lastValue.

Properties

errorOrNull → Object?
Returns the error if the status is LxError, otherwise null.
no setter
hasError → bool
Returns true if the status is LxError.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasValue → bool
Returns true if the status is LxSuccess.
no setter
isLoading → bool
Returns true if the status is LxWaiting.
no setter
lastValue → T?
The most recent successful value of type T, if any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackTraceOrNull → StackTrace?
Returns the stack trace if the status is LxError, otherwise null.
no setter
valueOrNull → T?
Returns the value if successful, otherwise null.
no setter

Methods

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

Operators

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