copyWith method

ApprovalDTO copyWith({
  1. SelfLinkDTO? links,
  2. List<ApproverDTO>? approvers,
  3. bool? canAnswerApproval,
  4. DateDTO? completedDate,
  5. DateDTO? createdDate,
  6. ApprovalDTOFinalDecision? finalDecision,
  7. String? id,
  8. String? name,
})

Implementation

ApprovalDTO copyWith(
    {SelfLinkDTO? links,
    List<ApproverDTO>? approvers,
    bool? canAnswerApproval,
    DateDTO? completedDate,
    DateDTO? createdDate,
    ApprovalDTOFinalDecision? finalDecision,
    String? id,
    String? name}) {
  return ApprovalDTO(
    links: links ?? this.links,
    approvers: approvers ?? this.approvers,
    canAnswerApproval: canAnswerApproval ?? this.canAnswerApproval,
    completedDate: completedDate ?? this.completedDate,
    createdDate: createdDate ?? this.createdDate,
    finalDecision: finalDecision ?? this.finalDecision,
    id: id ?? this.id,
    name: name ?? this.name,
  );
}