copyWith method
Implementation
ProductData copyWith({
int? id,
String? name,
double? price,
bool? active,
Value<String?> imagePath = const Value.absent(),
int? categoryId,
double? estimatedInputPrice,
double? taxRate,
Value<String?> description = const Value.absent(),
}) => ProductData(
id: id ?? this.id,
name: name ?? this.name,
price: price ?? this.price,
active: active ?? this.active,
imagePath: imagePath.present ? imagePath.value : this.imagePath,
categoryId: categoryId ?? this.categoryId,
estimatedInputPrice: estimatedInputPrice ?? this.estimatedInputPrice,
taxRate: taxRate ?? this.taxRate,
description: description.present ? description.value : this.description,
);