copy method
DeliveryOrderModel
copy({
- String? id,
- String? name,
- String? ordererId,
- Option<
CouponModel> ? coupon, - int? totalPrice,
- int? discount,
- int? deliveryTip,
- int? actualPaymentPrice,
- ApartmentModel? apartment,
- String? userPhoneNumber,
- String? detailedAddress,
- DateTime? updatedAt,
- DateTime? createdAt,
override
Implementation
@override
DeliveryOrderModel copy({
String? id,
String? name,
String? ordererId,
Option<CouponModel>? coupon,
int? totalPrice,
int? discount,
int? deliveryTip,
int? actualPaymentPrice,
ApartmentModel? apartment,
String? userPhoneNumber,
String? detailedAddress,
Iterable<OrderMenuModel>? menus,
DateTime? updatedAt,
DateTime? createdAt,
}) {
return DeliveryOrderModel(
id: id ?? this.id,
name: name ?? this.name,
ordererId: ordererId ?? this.ordererId,
coupon: coupon != null ? coupon.value : this.coupon,
totalPrice: totalPrice ?? this.totalPrice,
discount: discount ?? this.discount,
deliveryTip: deliveryTip ?? this.deliveryTip,
actualPaymentPrice: actualPaymentPrice ?? this.actualPaymentPrice,
apartment: apartment ?? this.apartment,
userPhoneNumber: userPhoneNumber ?? this.userPhoneNumber,
detailedAddress: detailedAddress ?? this.detailedAddress,
menus: menus ?? this.menus,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}