copy method
DeliveryOrderMenuModel
copy({
- String? id,
- String? orderId,
- String? ordererId,
- OrderedStoreModel? store,
- Iterable<
OrderMenuItemModel> ? items, - bool? isPaid,
- Option<
OrderMenuCancellation> ? cancellation, - Option<
OrderMenuPicking> ? picking, - Option<
OrderMenuDelivery> ? delivery, - int? totalPrice,
- OrderState? state,
- DateTime? createdAt,
- DateTime? updatedAt,
override
Implementation
@override
DeliveryOrderMenuModel copy({
String? id,
String? orderId,
String? ordererId,
OrderedStoreModel? store,
Iterable<OrderMenuItemModel>? items,
bool? isPaid,
Option<OrderMenuCancellation>? cancellation,
Option<OrderMenuPicking>? picking,
Option<OrderMenuDelivery>? delivery,
int? totalPrice,
OrderState? state,
DateTime? createdAt,
DateTime? updatedAt,
}) {
return DeliveryOrderMenuModel(
id: id ?? this.id,
orderId: orderId ?? this.orderId,
ordererId: ordererId ?? this.ordererId,
items: items ?? this.items,
isPaid: isPaid ?? this.isPaid,
cancellation:
cancellation != null ? cancellation.value : this.cancellation,
picking: picking != null ? picking.value : this.picking,
delivery: delivery != null ? delivery.value : this.delivery,
store: store ?? this.store,
totalPrice: totalPrice ?? this.totalPrice,
state: state ?? this.state,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}