AsyncError< T> class
Creates an AsyncValue in the error state.
I don't have a StackTrace, what can I do? You can still construct an AsyncError by passing StackTrace.current:
AsyncValue.error(error, StackTrace.current);
- Inheritance
-
- Object
- AsyncValue<
T> - AsyncError
- Available Extensions
Constructors
- AsyncError(Object error, StackTrace stackTrace)
-
Creates an AsyncValue in the error state.
const
Properties
- error → Object
-
The error.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- hasValue → bool
-
Whether value is set.
final
- isLoading → bool
-
Whether some new value is currently asynchronously loading.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- stackTrace → StackTrace
-
The stacktrace of error.
final
- value → T?
-
The value currently exposed.
read-onlyoverride
Methods
-
copyWithPrevious(
AsyncValue< T> previous, {bool isRefresh = true}) → AsyncError< 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