InfiniteQueryOptions<T, PageParam> constructor

const InfiniteQueryOptions<T, PageParam>({
  1. required List<Object> queryKey,
  2. InfiniteQueryFetcher<T, PageParam>? queryFn,
  3. GetNextPageParam<T, PageParam>? getNextPageParam,
  4. GetPreviousPageParam<T, PageParam>? getPreviousPageParam,
  5. PageParam? initialPageParam,
  6. Duration staleTime = const Duration(minutes: 5),
  7. Duration cacheTime = const Duration(minutes: 30),
  8. RetryConfig retryConfig = const RetryConfig(),
  9. bool refetchOnWindowFocus = true,
  10. bool refetchOnReconnect = true,
  11. bool enabled = true,
  12. int? maxPages,
  13. 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,
});