AsyncData<T extends Object> class sealed

定义一个基于异步状态的数据结构

Available extensions

Constructors

AsyncData.error(Object error, [StackTrace? stackTrace])
factory
AsyncData.loading()
factory
AsyncData.value(T value)
factory

Properties

data → T

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
dataOrNull → T?

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
error Object

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
hasData bool

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
hasError bool

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
hashCode int
The hash code for this object.
no setterinherited
hasValue bool

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
isLoading bool

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
value → T

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter
valueOrNull → T?

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

no setter

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

Available on AsyncData<T>, provided by the AsyncDataTypedExt extension

Operators

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