copyWith method

DeliveryRequest copyWith({
  1. int? id,
  2. int? user_id,
  3. int? payment_request_id,
  4. int? status_id,
  5. int? pickup_address_id,
  6. int? delivery_address_id,
  7. String? pickup_time,
  8. double? estimated_distance,
  9. int? actual_distance,
  10. String? estimated_duration,
  11. int? delivery_cost,
  12. String? recipient_name,
  13. String? recipient_mobile,
  14. String? item_type,
  15. String? note,
  16. String? instructions,
  17. String? created_at,
  18. String? updated_at,
  19. String? deleted_at,
  20. Status? status,
  21. User? user,
  22. PickupAddress? pickupAddress,
  23. DeliveryAddress? deliveryAddress,
  24. PaymentRequest? paymentRequest,
})

Implementation

DeliveryRequest copyWith({
  int? id,
  int? user_id,
  int? payment_request_id,
  int? status_id,
  int? pickup_address_id,
  int? delivery_address_id,
  String? pickup_time,
  double? estimated_distance,
  int? actual_distance,
  String? estimated_duration,
  int? delivery_cost,
  String? recipient_name,
  String? recipient_mobile,
  String? item_type,
  String? note,
  String? instructions,
  String? created_at,
  String? updated_at,
  String? deleted_at,
  Status? status,
  User? user,
  PickupAddress? pickupAddress,
  DeliveryAddress? deliveryAddress,
  PaymentRequest? paymentRequest,
}) {
  return DeliveryRequest(
    id: id ?? this.id,
    user_id: user_id ?? this.user_id,
    payment_request_id: payment_request_id ?? this.payment_request_id,
    status_id: status_id ?? this.status_id,
    pickup_address_id: pickup_address_id ?? this.pickup_address_id,
    delivery_address_id: delivery_address_id ?? this.delivery_address_id,
    pickup_time: pickup_time ?? this.pickup_time,
    estimated_distance: estimated_distance ?? this.estimated_distance,
    actual_distance: actual_distance ?? this.actual_distance,
    estimated_duration: estimated_duration ?? this.estimated_duration,
    delivery_cost: delivery_cost ?? this.delivery_cost,
    recipient_name: recipient_name ?? this.recipient_name,
    recipient_mobile: recipient_mobile ?? this.recipient_mobile,
    item_type: item_type ?? this.item_type,
    note: note ?? this.note,
    instructions: instructions ?? this.instructions,
    created_at: created_at ?? this.created_at,
    updated_at: updated_at ?? this.updated_at,
    deleted_at: deleted_at ?? this.deleted_at,
    status: status ?? this.status,
    user: user ?? this.user,
    pickupAddress: pickupAddress ?? this.pickupAddress,
    deliveryAddress: deliveryAddress ?? this.deliveryAddress,
    paymentRequest: paymentRequest ?? this.paymentRequest,
  );
}