copyWith method
SupplierData
copyWith(
{ - int? id,
- String? name,
- bool? active,
- String? email,
- Value<String?> address = const Value.absent(),
- Value<String?> phone = const Value.absent(),
- Value<String?> description = const Value.absent(),
- int? supplierTypeId,
- Value<String?> imagePath = const Value.absent(),
})
Implementation
SupplierData copyWith({
int? id,
String? name,
bool? active,
String? email,
Value<String?> address = const Value.absent(),
Value<String?> phone = const Value.absent(),
Value<String?> description = const Value.absent(),
int? supplierTypeId,
Value<String?> imagePath = const Value.absent(),
}) => SupplierData(
id: id ?? this.id,
name: name ?? this.name,
active: active ?? this.active,
email: email ?? this.email,
address: address.present ? address.value : this.address,
phone: phone.present ? phone.value : this.phone,
description: description.present ? description.value : this.description,
supplierTypeId: supplierTypeId ?? this.supplierTypeId,
imagePath: imagePath.present ? imagePath.value : this.imagePath,
);