AsyncData<T> class
Creates an AsyncValue with a data.
- Inheritance
-
- Object
- AsyncValue<
T> - AsyncData
- Available extensions
Constructors
- AsyncData(T value)
-
Creates an AsyncValue with a data.
const
Properties
- error → Object?
-
The error.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasValue → bool
-
Whether value is set.
no setteroverride
- isLoading → bool
-
Whether some new value is currently asynchronously loading.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The stacktrace of error.
final
- value → T
-
The value currently exposed.
final
Methods
-
copyWithPrevious(
AsyncValue< T> previous, {bool isRefresh = true}) → AsyncData<T> -
Clone an AsyncValue, merging it with
previous
.override -
map<
R> ({required R data(AsyncData< T> data), required R error(AsyncError<T> error), required R loading(AsyncLoading<T> loading)}) → R -
Perform some action based on the current state of the AsyncValue.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unwrapPrevious(
) → AsyncValue< T> -
The opposite of copyWithPrevious, reverting to the raw AsyncValue
with no information on the previous state.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited