ZenQueryConfig<T> constructor
const
ZenQueryConfig<T> ({
- Duration staleTime = const Duration(seconds: 30),
- Duration cacheTime = const Duration(minutes: 5),
- bool refetchOnMount = true,
- bool refetchOnFocus = false,
- bool refetchOnReconnect = true,
- Duration? refetchInterval,
- bool enableBackgroundRefetch = false,
- int retryCount = 3,
- Duration retryDelay = const Duration(milliseconds: 200),
- 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 = 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,
});