copyWithWrapped method

Paystub copyWithWrapped({
  1. Wrapped<Deductions>? deductions,
  2. Wrapped<String>? docId,
  3. Wrapped<Earnings>? earnings,
  4. Wrapped<Employee>? employee,
  5. Wrapped<PaystubEmployer>? employer,
  6. Wrapped<EmploymentDetails?>? employmentDetails,
  7. Wrapped<NetPay>? netPay,
  8. Wrapped<PayPeriodDetails>? payPeriodDetails,
  9. Wrapped<PaystubDetails?>? paystubDetails,
  10. Wrapped<List<IncomeBreakdown>?>? incomeBreakdown,
  11. Wrapped<PaystubYTDDetails?>? ytdEarnings,
})

Implementation

Paystub copyWithWrapped(
    {Wrapped<Deductions>? deductions,
    Wrapped<String>? docId,
    Wrapped<Earnings>? earnings,
    Wrapped<Employee>? employee,
    Wrapped<PaystubEmployer>? employer,
    Wrapped<EmploymentDetails?>? employmentDetails,
    Wrapped<NetPay>? netPay,
    Wrapped<PayPeriodDetails>? payPeriodDetails,
    Wrapped<PaystubDetails?>? paystubDetails,
    Wrapped<List<IncomeBreakdown>?>? incomeBreakdown,
    Wrapped<PaystubYTDDetails?>? ytdEarnings}) {
  return Paystub(
      deductions: (deductions != null ? deductions.value : this.deductions),
      docId: (docId != null ? docId.value : this.docId),
      earnings: (earnings != null ? earnings.value : this.earnings),
      employee: (employee != null ? employee.value : this.employee),
      employer: (employer != null ? employer.value : this.employer),
      employmentDetails: (employmentDetails != null
          ? employmentDetails.value
          : this.employmentDetails),
      netPay: (netPay != null ? netPay.value : this.netPay),
      payPeriodDetails: (payPeriodDetails != null
          ? payPeriodDetails.value
          : this.payPeriodDetails),
      paystubDetails: (paystubDetails != null
          ? paystubDetails.value
          : this.paystubDetails),
      incomeBreakdown: (incomeBreakdown != null
          ? incomeBreakdown.value
          : this.incomeBreakdown),
      ytdEarnings:
          (ytdEarnings != null ? ytdEarnings.value : this.ytdEarnings));
}