QueryOptions<T> constructor

const QueryOptions<T>({
  1. required List<Object> queryKey,
  2. QueryFetcher<T>? queryFn,
  3. Duration staleTime = const Duration(minutes: 5),
  4. Duration cacheTime = const Duration(minutes: 30),
  5. RetryConfig retryConfig = const RetryConfig(),
  6. bool refetchOnWindowFocus = true,
  7. bool refetchOnReconnect = true,
  8. bool refetchOnMount = true,
  9. bool enabled = true,
  10. T? initialData,
  11. T? placeholderData,
  12. bool keepPreviousData = false,
  13. bool structuralSharing = true,
  14. void onSuccess(
    1. T data
    )?,
  15. void onError(
    1. Object error
    )?,
  16. void onSettled(
    1. T? data,
    2. Object? error
    )?,
  17. R select<R>(
    1. T data
    )?,
  18. NetworkMode networkMode = NetworkMode.online,
  19. Map<String, dynamic>? meta,
})

Implementation

const QueryOptions({
  required this.queryKey,
  this.queryFn,
  this.staleTime = const Duration(minutes: 5),
  this.cacheTime = const Duration(minutes: 30),
  this.retryConfig = const RetryConfig(),
  this.refetchOnWindowFocus = true,
  this.refetchOnReconnect = true,
  this.refetchOnMount = true,
  this.enabled = true,
  this.initialData,
  this.placeholderData,
  this.keepPreviousData = false,
  this.structuralSharing = true,
  this.onSuccess,
  this.onError,
  this.onSettled,
  this.select,
  this.networkMode = NetworkMode.online,
  this.meta,
});