InfiniteQuerySnapshot<TData, TError, TPageParam> class
sealed
A Dart-idiomatic, exhaustively matchable snapshot of an infinite query.
Unlike InfiniteQueryResult, this is a sealed hierarchy: a switch over
it is checked for exhaustiveness, data is non-nullable on
InfiniteQuerySuccess, and error is non-nullable on InfiniteQueryError.
The activity axis is exposed via fetchStatus, with isFetching /
isPaused / isIdle as conveniences.
The three variants mirror QueryStatus. A failed next/previous page fetch keeps the overall status QuerySuccess-equivalent, so it is surfaced via the isFetchNextPageError / isFetchPreviousPageError flags rather than as a separate variant.
This is an experimental API and may change in a future minor release.
- Implementers
Properties
-
dataOrNull
→ InfiniteData<
TData, TPageParam> ? -
The accumulated pages, if any.
no setter
- dataUpdateCount → int
-
The number of times the data has been updated.
final
- dataUpdatedAt → DateTime?
-
The timestamp when the data was last updated.
final
- errorUpdateCount → int
-
The number of times the error has been updated.
final
- errorUpdatedAt → DateTime?
-
The timestamp when the error was last updated.
final
- failureCount → int
-
The number of times the current fetch has failed.
final
- failureReason → TError?
-
The error from the most recent failed fetch attempt.
final
-
fetchNextPage
→ FetchNextPage<
TData, TError, TPageParam> -
Fetches the next page of data.
final
-
fetchPreviousPage
→ FetchPreviousPage<
TData, TError, TPageParam> -
Fetches the previous page of data.
final
- fetchStatus → FetchStatus
-
The current network activity state of the query.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNextPage → bool
-
Whether there is a next page available.
final
- hasPreviousPage → bool
-
Whether there is a previous page available.
final
- isEnabled → bool
-
Whether this query is enabled and can fetch.
final
- isError → bool
-
Whether the query is in an error state.
no setter
- isFetched → bool
-
Whether the query has fetched at least once.
no setter
- isFetchedAfterMount → bool
-
Whether this query has been fetched after the observer mounted.
final
- isFetching → bool
-
Whether a fetch is currently in progress.
no setter
- isFetchingNextPage → bool
-
Whether this query is currently fetching the next page.
final
- isFetchingPreviousPage → bool
-
Whether this query is currently fetching the previous page.
final
- isFetchNextPageError → bool
-
Whether the last fetch of the next page resulted in an error.
final
- isFetchPreviousPageError → bool
-
Whether the last fetch of the previous page resulted in an error.
final
- isIdle → bool
-
Whether no fetch is in progress.
no setter
- isLoading → bool
-
Whether the query is fetching for the first time with no data.
no setter
- isLoadingError → bool
-
Whether the query failed on its initial load with no prior data.
no setter
- isPaused → bool
-
Whether the fetch is paused (typically offline).
no setter
- isPending → bool
-
Whether the query has no resolved data yet.
no setter
- isRefetchError → bool
-
Whether the query failed while refetching with existing data.
no setter
- isRefetching → bool
-
Whether the query is refetching all pages in the background.
no setter
- isStale → bool
-
Whether this query's data is considered stale.
final
- isSuccess → bool
-
Whether the query has resolved data.
no setter
-
pageParams
→ List<
TPageParam> -
The list of page parameters for all fetched pages.
no setter
-
pages
→ List<
TData> -
The list of all fetched pages.
no setter
-
refetch
→ InfiniteRefetch<
TData, TError, TPageParam> -
Refetches all pages of the query.
final
- 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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited