merge method
Returns options where each of other's non-null fields overrides
this one's, and other's unset fields fall through to this.
Implementation
SwrMutationOptions<T, Arg> merge(SwrMutationOptions<T, Arg>? other) {
if (other == null) return this;
return SwrMutationOptions<T, Arg>(
optimisticData: other.optimisticData ?? optimisticData,
revalidate: other.revalidate ?? revalidate,
populateCache: other.populateCache ?? populateCache,
populateCacheWith: other.populateCacheWith ?? populateCacheWith,
rollbackOnError: other.rollbackOnError ?? rollbackOnError,
throwOnError: other.throwOnError ?? throwOnError,
onSuccess: other.onSuccess ?? onSuccess,
onError: other.onError ?? onError,
);
}