ZenQueryConfig<T> constructor

const ZenQueryConfig<T>({
  1. Duration staleTime = const Duration(seconds: 30),
  2. Duration cacheTime = const Duration(minutes: 5),
  3. bool refetchOnMount = true,
  4. bool refetchOnFocus = false,
  5. bool refetchOnReconnect = true,
  6. Duration? refetchInterval,
  7. bool enableBackgroundRefetch = false,
  8. int retryCount = 3,
  9. Duration retryDelay = const Duration(milliseconds: 200),
  10. Duration maxRetryDelay = const Duration(seconds: 30),
  11. double retryBackoffMultiplier = 2.0,
  12. bool exponentialBackoff = true,
  13. bool retryWithJitter = true,
  14. bool autoPauseOnBackground = false,
  15. bool refetchOnResume = false,
  16. bool persist = false,
  17. T fromJson(
    1. Map<String, dynamic> json
    )?,
  18. Map<String, dynamic> toJson(
    1. T data
    )?,
  19. ZenStorage? storage,
  20. T? placeholderData,
})

Implementation

const ZenQueryConfig({
  this.staleTime = const Duration(seconds: 30),
  this.cacheTime = const Duration(minutes: 5),
  this.refetchOnMount = true,
  this.refetchOnFocus = false,
  this.refetchOnReconnect = true,
  this.refetchInterval,
  this.enableBackgroundRefetch = false,
  this.retryCount = 3,
  this.retryDelay = const Duration(milliseconds: 200),
  this.maxRetryDelay = const Duration(seconds: 30),
  this.retryBackoffMultiplier = 2.0,
  this.exponentialBackoff = true,
  this.retryWithJitter = true,
  this.autoPauseOnBackground = false,
  this.refetchOnResume = false,
  this.persist = false,
  this.fromJson,
  this.toJson,
  this.storage,
  this.placeholderData,
});