AsyncValue<T> class
sealed
Constructors
- AsyncValue.loading()
-
Constructs an AsyncLoading.
constfactory
- AsyncValue.withData(T data)
-
Constructs an AsyncValue.
constfactory
- AsyncValue.withError(Object error, StackTrace stackTrace)
-
Constructs an AsyncError.
constfactory
Properties
- data → T?
-
The data of an AsyncValue.
Is always
Tif the state is AsyncData.no setter - error → Object?
-
The error of an AsyncValue.
Is not null if the state is AsyncError.
no setter
- hasData → bool
-
Whether the state is AsyncData.
no setter
- hasError → bool
-
Whether the state is AsyncError.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- isLoading → bool
-
Whether the state is AsyncLoading.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The stack trace of an AsyncValue.
Is not null if the state is AsyncError.
no setter
Methods
-
maybeWhen<
R> ({R data(T data)?, R error(Object error, StackTrace stackTrace)?, R loading()?, required R orElse()}) → R - Syntactic sugar for AsyncSnapshot.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
R> ({required R data(T data), required R loading(), required R error(Object error, StackTrace stackTrace)}) → R - Syntactic sugar for AsyncValue.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override