copyWith method

Employee copyWith({
  1. PaystubAddress? address,
  2. String? name,
  3. String? maritalStatus,
  4. TaxpayerID? taxpayerId,
})

Implementation

Employee copyWith(
    {PaystubAddress? address,
    String? name,
    String? maritalStatus,
    TaxpayerID? taxpayerId}) {
  return Employee(
      address: address ?? this.address,
      name: name ?? this.name,
      maritalStatus: maritalStatus ?? this.maritalStatus,
      taxpayerId: taxpayerId ?? this.taxpayerId);
}