InfiniteQueryOptions<T, PageParam> class
Infinite query options
Constructors
-
InfiniteQueryOptions({required List<
Object> queryKey, InfiniteQueryFetcher<T, PageParam> ? queryFn, GetNextPageParam<T, PageParam> ? getNextPageParam, GetPreviousPageParam<T, PageParam> ? getPreviousPageParam, PageParam? initialPageParam, Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), RetryConfig retryConfig = const RetryConfig(), bool refetchOnWindowFocus = true, bool refetchOnReconnect = true, bool enabled = true, int? maxPages, NetworkMode networkMode = NetworkMode.online}) -
const
Properties
- cacheTime → Duration
-
The duration for which data remains in cache
final
- enabled → bool
-
Whether the query is enabled
final
-
getNextPageParam
→ GetNextPageParam<
T, PageParam> ? -
Function to get next page param
final
-
getPreviousPageParam
→ GetNextPageParam<
T, PageParam> ? -
Function to get previous page param
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialPageParam → PageParam?
-
Initial page param
final
- maxPages → int?
-
Maximum number of pages to keep in memory
final
- networkMode → NetworkMode
-
Network mode for the query
final
-
queryFn
→ InfiniteQueryFetcher<
T, PageParam> ? -
Query fetcher function
final
-
queryKey
→ List<
Object> -
Query key
final
- refetchOnReconnect → bool
-
Whether to refetch when network reconnects
final
- refetchOnWindowFocus → bool
-
Whether to refetch when window regains focus
final
- retryConfig → RetryConfig
-
Retry configuration
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- staleTime → Duration
-
The duration after which cached data is considered stale
final
Methods
-
copyWith(
{List< Object> ? queryKey, InfiniteQueryFetcher<T, PageParam> ? queryFn, GetNextPageParam<T, PageParam> ? getNextPageParam, GetPreviousPageParam<T, PageParam> ? getPreviousPageParam, PageParam? initialPageParam, Duration? staleTime, Duration? cacheTime, RetryConfig? retryConfig, bool? refetchOnWindowFocus, bool? refetchOnReconnect, bool? enabled, int? maxPages, NetworkMode? networkMode}) → InfiniteQueryOptions<T, PageParam> -
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