copyWith method

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

Implementation

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