InfiniteQueryOptions<T, PageParam> constructor
const
InfiniteQueryOptions<T, PageParam> ({
- 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,
Implementation
const InfiniteQueryOptions({
required this.queryKey,
this.queryFn,
this.getNextPageParam,
this.getPreviousPageParam,
this.initialPageParam,
this.staleTime = const Duration(minutes: 5),
this.cacheTime = const Duration(minutes: 30),
this.retryConfig = const RetryConfig(),
this.refetchOnWindowFocus = true,
this.refetchOnReconnect = true,
this.enabled = true,
this.maxPages,
this.networkMode = NetworkMode.online,
});