AsyncError<T> class final Async Value

The error of an AsyncValue.

Inheritance

Properties

data → T?
Represents the previous data before the error.
final
error Object
The error of an AsyncValue. Is not null if the state is AsyncError.
final
hasData bool
Whether the state is AsyncData.
no setterinherited
hasError bool
Whether the state is AsyncError.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
Whether the state is AsyncLoading.
no setterinherited
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.
final

Methods

map<R>(R mapper(T data)) AsyncValue<R>
Maps the data type of this AsyncValue to R while preserving the loading and error state. This can be used to add additional data to the AsyncValue.
inherited
maybeWhen<R>({R data(T data)?, R loading()?, R error(Object error, StackTrace stackTrace)?, required R orElse(), bool skipLoading = true, bool skipError = false}) → R
Syntactic sugar for AsyncValue.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
when<R>({required R data(T data), required R loading(), required R error(Object error, StackTrace stackTrace), bool skipLoading = true, bool skipError = false}) → R
Syntactic sugar for AsyncValue. If skipLoading is true and there is previous data, the result of data will be returned instead of loading. If skipError is true and there is previous data, the result of data will be returned instead of error.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited