AsyncLoading<T> class final

Loading state for an AsyncValue.

Inheritance

Constructors

AsyncLoading({T? previous})
Creates a loading value, optionally with a previous value.
const

Properties

asData AsyncData<T>?
Returns this value as AsyncData if it holds data, otherwise null.
no setterinherited
asError AsyncError<T>?
Returns this value as AsyncError if it holds an error, otherwise null.
no setterinherited
error Object?
Returns the error if present, otherwise null.
no setterinherited
hasError bool
Whether this value represents an error state.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
Whether this value represents a loading state.
no setterinherited
previous → T?
final
requireValue → T
Returns the current data or throws if no data is available.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
Returns the stack trace if present, otherwise null.
no setterinherited
value → T?
Returns the latest data value, including cached/previous values.
no setterinherited
valueOrNull → T?
Returns the current data value if available, otherwise null.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a debug-friendly string for this state.
override

Operators

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