FutureValue<A> class
abstract
Represents the loading, error and data state of an async operation.
- Implementers
Constructors
- FutureValue()
-
const
- FutureValue.data(A data)
-
constfactory
- FutureValue.error(dynamic error, StackTrace stackTrace)
-
constfactory
- FutureValue.loading([A? previousData])
-
constfactory
Properties
- dataOrNull → A?
-
Attempt to read the data from this FutureValue, otherwise return
null
if it is in a loading or error state.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isLoading → bool
-
Is the data still loading?
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
combineWith<
B> (FutureValue< B> other) → FutureValue<(A, B)> -
combineWith2<
B, C> (FutureValue< B> one, FutureValue<C> two) → FutureValue<(A, B, C)> -
map<
B> (B f(A a)) → FutureValue< B> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
B> ({required B data(A a), required B error(dynamic error, StackTrace stackTrace), required B loading(A? previousData)}) → B -
whenOrElse<
B> ({B data(A a)?, B error(dynamic error, StackTrace stackTrace)?, B loading(A? previousData)?, required B orElse()}) → B
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited