AsyncState<T> class
sealed
Base class representing the state of an asynchronous cell
An asynchronous cell can be in one of the following states:
-
The loading state represented by the class AsyncStateLoading.
This state indicates that the asynchronous cell value is still pending.
-
The data state represented by the class AsyncStateData.
This state indicates that the asynchronous value is ready and has been computed successfully.
-
The error state represented by the class AsyncStateError.
This state indicates that an exception was thrown while computing the asynchronous value.
- Implementers
Constructors
-
AsyncState.forCell(FutureCell<
T> cell) -
Create an async state for a cell holding a Future.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isData → bool
-
Is this a data state?
no setter
- isError → bool
-
Is this an error state?
no setter
- isLoading → bool
-
Is this a pending asynchronous value state?
no setter
- lastValue → T?
-
The last value to which the Future completed or null if none.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
makeState<
T> ({required ValueCell< T> current}) → AsyncState<T>