AsyncLoading<T> class

A class that represents a value that is being loaded asynchronously.

Inheritance

Constructors

AsyncLoading()

Properties

hashCode int
The hash code for this object.
no setteroverride
isData bool
Returns true if this is AsyncData.
no setterinherited
isError bool
Returns true if this is AsyncError.
no setterinherited
isIdle bool
Returns true if this is AsyncIdle.
no setterinherited
isIdleOrLoading bool
Returns true if this is AsyncIdle or AsyncLoading.
no setteroverride
isLoading bool
Returns true if this is AsyncLoading.
no setteroverride
lastData → T?
Returns the last data that was successfully loaded This is useful when the current state is AsyncError or AsyncLoading
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valueOrNull → T?
If this is AsyncData, returns it's value. Otherwise returns null.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLastData(T? value) → void
This is useful when manually hanlding async state and you want to keep track of the last successful data. You can use the lastData getter to retrieve the last successful data when in AsyncError or AsyncLoading state.
inherited
toString() String
A string representation of this object.
inherited
unwrap() → T
Casts this AsyncValue to AsyncData and return it's value or throws CastError if this is not AsyncData.
inherited
unwrapOrNull() → T?
If this is AsyncData, returns it's value. Otherwise returns null.
inherited

Operators

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