ZenQueryConfig<T> constructor
const
ZenQueryConfig<T> ({
- Duration staleTime = const Duration(seconds: 30),
- Duration cacheTime = const Duration(minutes: 5),
- RefetchBehavior refetchOnMount = RefetchBehavior.ifStale,
- RefetchBehavior refetchOnFocus = RefetchBehavior.never,
- RefetchBehavior refetchOnReconnect = RefetchBehavior.ifStale,
- NetworkMode networkMode = NetworkMode.online,
- Duration? refetchInterval,
- bool enableBackgroundRefetch = false,
- int retryCount = 3,
- Duration retryDelay = const Duration(milliseconds: 200),
- RetryDelayFn? retryDelayFn,
- Duration maxRetryDelay = const Duration(seconds: 30),
- double retryBackoffMultiplier = 2.0,
- bool exponentialBackoff = true,
- bool retryWithJitter = true,
- bool autoPauseOnBackground = false,
- bool refetchOnResume = false,
- bool persist = false,
- T fromJson()?,
- Map<
String, dynamic> toJson(- T data
- ZenStorage? storage,
- T? placeholderData,
Implementation
const ZenQueryConfig({
this.staleTime = const Duration(seconds: 30),
this.cacheTime = const Duration(minutes: 5),
this.refetchOnMount = RefetchBehavior.ifStale,
this.refetchOnFocus = RefetchBehavior.never,
this.refetchOnReconnect = RefetchBehavior.ifStale,
this.networkMode = NetworkMode.online,
this.refetchInterval,
this.enableBackgroundRefetch = false,
this.retryCount = 3,
this.retryDelay = const Duration(milliseconds: 200),
this.retryDelayFn,
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,
});