copyWith method

Product copyWith({
  1. String? name,
  2. int? quantity,
  3. int? unitAmount,
})

Implementation

Product copyWith({
  String? name,
  int? quantity,
  int? unitAmount,
}) =>
    Product(
      name: name ?? this.name,
      quantity: quantity ?? this.quantity,
      unitAmount: unitAmount ?? this.unitAmount,
    );