copyWith method

InvoiceLine copyWith({
  1. String? priceToken,
  2. double? quantity,
  3. Price? price,
  4. String? description,
  5. double? amount,
})

Specify how to clone the concrete class.

Implementation

InvoiceLine copyWith(
    {String? priceToken,
    double? quantity,
    Price? price,
    String? description,
    double? amount}) {
  return InvoiceLine(
      priceToken: priceToken ?? this.priceToken,
      quantity: quantity ?? this.quantity,
      description: description ?? this.description,
      amount: amount ?? this.amount,
      price: price ?? this.price);
}