copyWith method

ZenMutationJob copyWith({
  1. int? retryCount,
})

Returns a copy of this job with updated fields (e.g. incremented retryCount).

Implementation

ZenMutationJob copyWith({int? retryCount}) {
  return ZenMutationJob(
    id: id,
    mutationKey: mutationKey,
    action: action,
    payload: payload,
    createdAt: createdAt,
    retryCount: retryCount ?? this.retryCount,
  );
}