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(seconds: 1),
  10. bool exponentialBackoff = true,
  11. bool persist = false,
  12. T fromJson(
    1. Map<String, dynamic> json
    )?,
  13. Map<String, dynamic> toJson(
    1. T data
    )?,
  14. ZenStorage? storage,
  15. 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(seconds: 1),
  this.exponentialBackoff = true,
  this.persist = false,
  this.fromJson,
  this.toJson,
  this.storage,
  this.placeholderData,
});