copyWithCompanion method

CustomerData copyWithCompanion(
  1. CustomerCompanion data
)

Implementation

CustomerData copyWithCompanion(CustomerCompanion data) {
  return CustomerData(
    id: data.id.present ? data.id.value : this.id,
    code: data.code.present ? data.code.value : this.code,
    name: data.name.present ? data.name.value : this.name,
    vip: data.vip.present ? data.vip.value : this.vip,
    address: data.address.present ? data.address.value : this.address,
    phone: data.phone.present ? data.phone.value : this.phone,
    email: data.email.present ? data.email.value : this.email,
    imagePath: data.imagePath.present ? data.imagePath.value : this.imagePath,
  );
}