copyWithWrapped method

Employee copyWithWrapped({
  1. Wrapped<PaystubAddress>? address,
  2. Wrapped<String?>? name,
  3. Wrapped<String?>? maritalStatus,
  4. Wrapped<TaxpayerID?>? taxpayerId,
})

Implementation

Employee copyWithWrapped(
    {Wrapped<PaystubAddress>? address,
    Wrapped<String?>? name,
    Wrapped<String?>? maritalStatus,
    Wrapped<TaxpayerID?>? taxpayerId}) {
  return Employee(
      address: (address != null ? address.value : this.address),
      name: (name != null ? name.value : this.name),
      maritalStatus:
          (maritalStatus != null ? maritalStatus.value : this.maritalStatus),
      taxpayerId: (taxpayerId != null ? taxpayerId.value : this.taxpayerId));
}