copyWith method

Order copyWith({
  1. int? id,
  2. String? vendorOrderId,
  3. dynamic reason,
  4. int? displayId,
  5. int? stage,
  6. String? paymentType,
  7. List<Destination>? origin,
  8. List<Destination>? destination,
  9. dynamic returnAddress,
  10. Pricing? pricing,
  11. Distances? distances,
  12. Delivery? delivery,
  13. Vendor? vendor,
  14. dynamic courier,
  15. dynamic trace,
  16. DateTime? createdAt,
})

Implementation

Order copyWith({
  int? id,
  String? vendorOrderId,
  dynamic reason,
  int? displayId,
  int? stage,
  String? paymentType,
  List<Destination>? origin,
  List<Destination>? destination,
  dynamic returnAddress,
  Pricing? pricing,
  Distances? distances,
  Delivery? delivery,
  Vendor? vendor,
  dynamic courier,
  dynamic trace,
  DateTime? createdAt,
}) =>
    Order(
      id: id ?? this.id,
      vendorOrderId: vendorOrderId ?? this.vendorOrderId,
      reason: reason ?? this.reason,
      displayId: displayId ?? this.displayId,
      stage: stage ?? this.stage,
      paymentType: paymentType ?? this.paymentType,
      origin: origin ?? this.origin,
      destination: destination ?? this.destination,
      returnAddress: returnAddress ?? this.returnAddress,
      pricing: pricing ?? this.pricing,
      distances: distances ?? this.distances,
      delivery: delivery ?? this.delivery,
      vendor: vendor ?? this.vendor,
      courier: courier ?? this.courier,
      trace: trace ?? this.trace,
      createdAt: createdAt ?? this.createdAt,
    );