QuerySuccess<TData, TError> class final

The query has resolved data.

This is an experimental API and may change in a future minor release.

Inheritance

Constructors

QuerySuccess({required TData data, required bool isPlaceholder, required FetchStatus fetchStatus, required DateTime? dataUpdatedAt, required int dataUpdateCount, required DateTime? errorUpdatedAt, required int errorUpdateCount, required int failureCount, required TError? failureReason, required bool isEnabled, required bool isStale, required bool isFetchedAfterMount, required Refetch<TData, TError> refetch})
Creates a success snapshot.
const

Properties

data → TData
The resolved data.
final
dataOrNull → TData?
The last-known data, regardless of the current state.
no setteroverride
dataUpdateCount int
The number of times the data has been updated.
finalinherited
dataUpdatedAt DateTime?
The timestamp when the data was last updated.
finalinherited
errorUpdateCount int
The number of times the error has been updated.
finalinherited
errorUpdatedAt DateTime?
The timestamp when the error was last updated.
finalinherited
failureCount int
The number of times the current fetch has failed.
finalinherited
failureReason → TError?
The error from the most recent failed fetch attempt.
finalinherited
fetchStatus FetchStatus
The current network activity state of the query.
finalinherited
hashCode int
The hash code for this object.
no setteroverride
isEnabled bool
Whether this query is enabled and can fetch.
finalinherited
isError bool
Whether the query is in an error state.
no setterinherited
isFetched bool
Whether the query has fetched at least once.
no setterinherited
isFetchedAfterMount bool
Whether this query has been fetched after the observer mounted.
finalinherited
isFetching bool
Whether a fetch is currently in progress.
no setterinherited
isIdle bool
Whether no fetch is in progress.
no setterinherited
isLoading bool
Whether the query is fetching for the first time with no data.
no setterinherited
isLoadingError bool
Whether the query failed on its initial load with no prior data.
no setterinherited
isPaused bool
Whether the fetch is paused (typically offline).
no setterinherited
isPending bool
Whether the query has no resolved data yet.
no setterinherited
isPlaceholder bool
Whether data is placeholder data (not persisted to the cache).
final
isRefetchError bool
Whether the query failed while refetching with existing data.
no setterinherited
isRefetching bool
Whether the query is refetching in the background.
no setterinherited
isStale bool
Whether this query's data is considered stale.
finalinherited
isSuccess bool
Whether the query has resolved data.
no setterinherited
refetch → Refetch<TData, TError>
Refetches the query data.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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