AsyncError<T> class
State for an AsyncState with an error
- Inheritance
-
- Object
- AsyncState<
T> - AsyncError
Constructors
- AsyncError(Object error, StackTrace? stackTrace, {bool isLoading = false, T? value})
-
State for an AsyncState with an error
const
Properties
- error → Object
-
Returns the error of the state.
no setteroverride
- hasError → bool
-
Returns true if the state has an error
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasValue → bool
-
Returns true if the state has a value
no setteroverride
- isLoading → bool
-
Check if the state is a loading state
finalinherited
- isRefreshing → bool
-
Returns true if the state is refreshing with a loading flag,
has a value or error and is not the loading state
no setterinherited
- isReloading → bool
-
Returns true if the state is reloading with having a value or error,
and is the loading state
no setterinherited
- requireValue → T
-
Force unwrap the value of the state.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
Returns the stack trace of the state.
no setterinherited
- value → T?
-
Returns the value of the state.
no setterinherited
Methods
-
map<
E> ({required AsyncDataBuilder< E, T> data, required AsyncErrorBuilder<E> error, required AsyncStateBuilder<E> loading, AsyncStateBuilder<E> ? reloading, AsyncStateBuilder<E> ? refreshing}) → E -
Map the state to a value.
inherited
-
maybeMap<
E> ({AsyncDataBuilder< E, T> ? data, AsyncErrorBuilder<E> ? error, AsyncStateBuilder<E> ? loading, AsyncStateBuilder<E> ? reloading, AsyncStateBuilder<E> ? refreshing, required AsyncStateBuilder<E> orElse}) → E -
Map the state to a value with optional or else.
inherited
-
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 ==(
covariant AsyncState< T> other) → bool -
The equality operator.
inherited