copyWithWrapped method

PayrollItem copyWithWrapped({
  1. Wrapped<String>? itemId,
  2. Wrapped<String>? institutionId,
  3. Wrapped<String>? institutionName,
  4. Wrapped<List<PayrollIncomeAccountData>>? accounts,
  5. Wrapped<List<PayrollIncomeObject>>? payrollIncome,
  6. Wrapped<PayrollItemStatus?>? status,
  7. Wrapped<DateTime?>? updatedAt,
})

Implementation

PayrollItem copyWithWrapped(
    {Wrapped<String>? itemId,
    Wrapped<String>? institutionId,
    Wrapped<String>? institutionName,
    Wrapped<List<PayrollIncomeAccountData>>? accounts,
    Wrapped<List<PayrollIncomeObject>>? payrollIncome,
    Wrapped<PayrollItemStatus?>? status,
    Wrapped<DateTime?>? updatedAt}) {
  return PayrollItem(
      itemId: (itemId != null ? itemId.value : this.itemId),
      institutionId:
          (institutionId != null ? institutionId.value : this.institutionId),
      institutionName: (institutionName != null
          ? institutionName.value
          : this.institutionName),
      accounts: (accounts != null ? accounts.value : this.accounts),
      payrollIncome:
          (payrollIncome != null ? payrollIncome.value : this.payrollIncome),
      status: (status != null ? status.value : this.status),
      updatedAt: (updatedAt != null ? updatedAt.value : this.updatedAt));
}