QueryResult<T> class final

UI-facing projection of a query's two state axes.

Constructors

QueryResult({required QueryState<T> state, required bool isStale})
Creates a UI projection from state and freshness.
const

Properties

data → T?
The current data value.
no setter
error → Object?
The latest query error.
no setter
errorStackTrace → StackTrace?
The stack trace for error.
no setter
hasData → bool
Whether a data value is present.
no setter
hashCode → int
The hash code for this object.
no setteroverride
isError → bool
Whether the latest fetch failed.
no setter
isFetching → bool
Whether a fetch is running.
no setter
isLoading → bool
Whether the initial fetch is running.
no setter
isLoadingError → bool
Whether the initial fetch failed without data.
no setter
isPaused → bool
Whether a fetch is paused.
no setter
isPending → bool
Whether no successful result has been stored yet.
no setter
isRefetchError → bool
Whether a refetch failed while retaining data.
no setter
isRefetching → bool
Whether a fetch is running after data was stored.
no setter
isStale → bool
Whether the current data is stale.
final
isSuccess → bool
Whether the query holds a successful result.
no setter
requireData → T
Returns current data or throws when absent.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → QueryState<T>
The complete cached state.
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

Operators

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