InfiniteQueryOptions<TData, TParam> class

Configuration options for infinite queries.

Controls cache behavior, callbacks, pagination cursors, and page retention.

Constructors

InfiniteQueryOptions({bool enabled = true, Duration? staleTime, Duration? cacheTime, bool refetchOnMount = false, VoidCallback? onSuccess, void onError(Object error)?, TParam? getNextPageParam(List<Page<TData, TParam>> pages, TData? lastPageData)?, TParam? getPreviousPageParam(List<Page<TData, TParam>> pages, TData? firstPageData)?, int? maxPages})
Creates infinite query options.
const

Properties

cacheTime Duration?
How long inactive query data is kept in cache.
final
enabled bool
Whether the query is allowed to run.
final
getNextPageParam → TParam? Function(List<Page<TData, TParam>> pages, TData? lastPageData)?
Computes the next page parameter from current pages and last page data.
final
getPreviousPageParam → TParam? Function(List<Page<TData, TParam>> pages, TData? firstPageData)?
Computes the previous page parameter from current pages and first page data.
final
hashCode int
The hash code for this object.
no setterinherited
maxPages int?
Maximum number of pages to keep in memory.
final
onError → void Function(Object error)?
Callback invoked when a fetch fails.
final
onSuccess VoidCallback?
Callback invoked after a successful fetch.
final
refetchOnMount bool
Whether to refetch when the query mounts.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
staleTime Duration?
Duration for which fetched data is considered fresh.
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.
inherited