copy method

  1. @override
DeliveryOrderMenuModel copy({
  1. String? id,
  2. String? orderId,
  3. String? ordererId,
  4. OrderedStoreModel? store,
  5. Iterable<OrderMenuItemModel>? items,
  6. bool? isPaid,
  7. Option<OrderMenuCancellation>? cancellation,
  8. Option<OrderMenuPicking>? picking,
  9. Option<OrderMenuDelivery>? delivery,
  10. int? totalPrice,
  11. OrderState? state,
  12. DateTime? createdAt,
  13. 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,
  );
}