copyWith method
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,
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,
);
}