copyWith method
TicketWeebi
copyWith({
- String? firmIdAndBoutiqueId,
- int? id,
- int? shopId,
- List<
ItemCartWeebi< ? items,ArticleRawAbstract> > - TaxWeebi? taxe,
- double? promo,
- num? discountAmount,
- String? comment,
- num? received,
- DateTime? date,
- PaymentType? paymentType,
- TicketType? ticketType,
- int? contactId,
- String? contactFirstName,
- String? contactLastName,
- String? contactPhone,
- String? contactMail,
- bool? status,
- DateTime? statusUpdateDate,
- DateTime? creationDate,
Implementation
TicketWeebi copyWith({
String? firmIdAndBoutiqueId,
int? id,
int? shopId,
List<ItemCartWeebi>? items,
TaxWeebi? taxe,
double? promo,
num? discountAmount,
String? comment,
num? received,
DateTime? date,
PaymentType? paymentType,
TicketType? ticketType,
int? contactId,
String? contactFirstName,
String? contactLastName,
String? contactPhone,
String? contactMail,
bool? status,
DateTime? statusUpdateDate,
DateTime? creationDate,
}) {
return TicketWeebi(
firmIdAndBoutiqueId: firmIdAndBoutiqueId ?? this.firmIdAndBoutiqueId,
id: id ?? this.id,
items: items ??
this.items.map((e) => e).toList(), // a real copy, not a reference
taxe: taxe ?? this.taxe,
promo: promo ?? this.promo,
comment: comment ?? this.comment,
received: received ?? this.received,
date: date ?? this.date,
paymentType: paymentType ?? this.paymentType,
ticketType: ticketType ?? this.ticketType,
contactId: contactId ?? this.contactId,
contactFirstName: contactFirstName ?? this.contactFirstName,
contactLastName: contactLastName ?? this.contactLastName,
contactPhone: contactPhone ?? this.contactPhone,
contactMail: contactMail ?? this.contactMail,
status: status ?? this.status,
statusUpdateDate: statusUpdateDate ?? this.statusUpdateDate,
creationDate: creationDate ?? this.creationDate,
discountAmount: discountAmount ?? this.discountAmount,
);
}