copyWithWrapped method

W2 copyWithWrapped({
  1. Wrapped<PaystubEmployer?>? employer,
  2. Wrapped<Employee?>? employee,
  3. Wrapped<String?>? taxYear,
  4. Wrapped<String?>? employerIdNumber,
  5. Wrapped<String?>? wagesTipsOtherComp,
  6. Wrapped<String?>? federalIncomeTaxWithheld,
  7. Wrapped<String?>? socialSecurityWages,
  8. Wrapped<String?>? socialSecurityTaxWithheld,
  9. Wrapped<String?>? medicareWagesAndTips,
  10. Wrapped<String?>? medicareTaxWithheld,
  11. Wrapped<String?>? socialSecurityTips,
  12. Wrapped<String?>? allocatedTips,
  13. Wrapped<String?>? box9,
  14. Wrapped<String?>? dependentCareBenefits,
  15. Wrapped<String?>? nonqualifiedPlans,
  16. Wrapped<List<W2Box12>?>? box12,
  17. Wrapped<String?>? statutoryEmployee,
  18. Wrapped<String?>? retirementPlan,
  19. Wrapped<String?>? thirdPartySickPay,
  20. Wrapped<String?>? other,
  21. Wrapped<List<W2StateAndLocalWages>?>? stateAndLocalWages,
})

Implementation

W2 copyWithWrapped(
    {Wrapped<PaystubEmployer?>? employer,
    Wrapped<Employee?>? employee,
    Wrapped<String?>? taxYear,
    Wrapped<String?>? employerIdNumber,
    Wrapped<String?>? wagesTipsOtherComp,
    Wrapped<String?>? federalIncomeTaxWithheld,
    Wrapped<String?>? socialSecurityWages,
    Wrapped<String?>? socialSecurityTaxWithheld,
    Wrapped<String?>? medicareWagesAndTips,
    Wrapped<String?>? medicareTaxWithheld,
    Wrapped<String?>? socialSecurityTips,
    Wrapped<String?>? allocatedTips,
    Wrapped<String?>? box9,
    Wrapped<String?>? dependentCareBenefits,
    Wrapped<String?>? nonqualifiedPlans,
    Wrapped<List<W2Box12>?>? box12,
    Wrapped<String?>? statutoryEmployee,
    Wrapped<String?>? retirementPlan,
    Wrapped<String?>? thirdPartySickPay,
    Wrapped<String?>? other,
    Wrapped<List<W2StateAndLocalWages>?>? stateAndLocalWages}) {
  return W2(
      employer: (employer != null ? employer.value : this.employer),
      employee: (employee != null ? employee.value : this.employee),
      taxYear: (taxYear != null ? taxYear.value : this.taxYear),
      employerIdNumber: (employerIdNumber != null
          ? employerIdNumber.value
          : this.employerIdNumber),
      wagesTipsOtherComp: (wagesTipsOtherComp != null
          ? wagesTipsOtherComp.value
          : this.wagesTipsOtherComp),
      federalIncomeTaxWithheld: (federalIncomeTaxWithheld != null
          ? federalIncomeTaxWithheld.value
          : this.federalIncomeTaxWithheld),
      socialSecurityWages: (socialSecurityWages != null
          ? socialSecurityWages.value
          : this.socialSecurityWages),
      socialSecurityTaxWithheld: (socialSecurityTaxWithheld != null
          ? socialSecurityTaxWithheld.value
          : this.socialSecurityTaxWithheld),
      medicareWagesAndTips: (medicareWagesAndTips != null
          ? medicareWagesAndTips.value
          : this.medicareWagesAndTips),
      medicareTaxWithheld: (medicareTaxWithheld != null
          ? medicareTaxWithheld.value
          : this.medicareTaxWithheld),
      socialSecurityTips: (socialSecurityTips != null
          ? socialSecurityTips.value
          : this.socialSecurityTips),
      allocatedTips:
          (allocatedTips != null ? allocatedTips.value : this.allocatedTips),
      box9: (box9 != null ? box9.value : this.box9),
      dependentCareBenefits: (dependentCareBenefits != null
          ? dependentCareBenefits.value
          : this.dependentCareBenefits),
      nonqualifiedPlans: (nonqualifiedPlans != null
          ? nonqualifiedPlans.value
          : this.nonqualifiedPlans),
      box12: (box12 != null ? box12.value : this.box12),
      statutoryEmployee: (statutoryEmployee != null
          ? statutoryEmployee.value
          : this.statutoryEmployee),
      retirementPlan: (retirementPlan != null
          ? retirementPlan.value
          : this.retirementPlan),
      thirdPartySickPay: (thirdPartySickPay != null
          ? thirdPartySickPay.value
          : this.thirdPartySickPay),
      other: (other != null ? other.value : this.other),
      stateAndLocalWages: (stateAndLocalWages != null
          ? stateAndLocalWages.value
          : this.stateAndLocalWages));
}