copyWith method
Implementation
Invoice copyWith({
String? customerName,
String? invoiceNumber,
DateTime? date,
List<InvoiceItem>? items,
double? tax,
double? total,
String? notes,
String? template,
}) {
return Invoice(
customerName: customerName ?? this.customerName,
invoiceNumber: invoiceNumber ?? this.invoiceNumber,
date: date ?? this.date,
items: items ?? this.items,
tax: tax ?? this.tax,
total: total ?? this.total,
notes: notes ?? this.notes,
template: template ?? this.template,
);
}