AsyncValue<T> class

Wrapper for async values with loading/error states

Constructors

AsyncValue.error(Object? error, [StackTrace? stackTrace, int? retryCount])
const
AsyncValue.idle()
const
AsyncValue.loading([int? retryCount])
const
AsyncValue.success(T? data)
const

Properties

data → T?
final
error Object?
final
errorMessage String
Get user-friendly error message
no setter
hashCode int
The hash code for this object.
no setterinherited
isError bool
no setter
isIdle bool
no setter
isLoading bool
no setter
isSuccess bool
no setter
retryCount int?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
final
state AsyncState
final

Methods

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 idle(), required R loading(), required R success(T data), required R error(Object error, StackTrace? stackTrace)}) → R

Operators

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