merge method

ZenQueryConfig<T> merge(
  1. ZenQueryConfig<T>? other
)

Merge with another config (other's values take precedence)

Implementation

ZenQueryConfig<T> merge(ZenQueryConfig<T>? other) {
  if (other == null) return this;

  return ZenQueryConfig<T>(
    staleTime: other.staleTime,
    cacheTime: other.cacheTime,
    refetchOnMount: other.refetchOnMount,
    refetchOnFocus: other.refetchOnFocus,
    refetchOnReconnect: other.refetchOnReconnect,
    refetchInterval: other.refetchInterval ?? refetchInterval,
    enableBackgroundRefetch: other.enableBackgroundRefetch,
    retryCount: other.retryCount,
    retryDelay: other.retryDelay,
    maxRetryDelay: other.maxRetryDelay,
    retryBackoffMultiplier: other.retryBackoffMultiplier,
    exponentialBackoff: other.exponentialBackoff,
    retryWithJitter: other.retryWithJitter,
    autoPauseOnBackground: other.autoPauseOnBackground,
    refetchOnResume: other.refetchOnResume,
    persist: other.persist,
    fromJson: other.fromJson ?? fromJson,
    toJson: other.toJson ?? toJson,
    storage: other.storage ?? storage,
    placeholderData: other.placeholderData ?? placeholderData,
  );
}