copyWith method

Product copyWith({
  1. int? id,
  2. String? name,
  3. double? price,
  4. String? description,
})
override

Implementation

Product copyWith({int? id, String? name, double? price, String? description}) {
  return Product(
    id: id ?? this.id,
    name: name ?? this.name,
    price: price ?? this.price,
    description: description ?? this.description,
  );
}