OrderData.fromJson constructor
OrderData.fromJson(
- Map<String, dynamic> json
)
Implementation
factory OrderData.fromJson(Map<String, dynamic> json) => OrderData(
orderId: json["order_id"],
orderDate: json["order_date"],
pickupLocation: json["pickup_location"],
channelId: json["channel_id"],
comment: json["comment"],
billingCustomerName: json["billing_customer_name"],
billingLastName: json["billing_last_name"],
billingAddress: json["billing_address"],
billingAddress2: json["billing_address_2"],
billingCity: json["billing_city"],
billingPincode: json["billing_pincode"],
billingState: json["billing_state"],
billingCountry: json["billing_country"],
billingEmail: json["billing_email"],
billingPhone: json["billing_phone"],
shippingIsBilling: json["shipping_is_billing"],
shippingCustomerName: json["shipping_customer_name"],
shippingLastName: json["shipping_last_name"],
shippingAddress: json["shipping_address"],
shippingAddress2: json["shipping_address_2"],
shippingCity: json["shipping_city"],
shippingPincode: json["shipping_pincode"],
shippingCountry: json["shipping_country"],
shippingState: json["shipping_state"],
shippingEmail: json["shipping_email"],
shippingPhone: json["shipping_phone"],
orderItems: json["order_items"] == null
? null
: List<OrderItem>.from(
json["order_items"].map((x) => OrderItem.fromJson(x))),
paymentMethod: json["payment_method"],
shippingCharges: json["shipping_charges"],
giftwrapCharges: json["giftwrap_charges"],
transactionCharges: json["transaction_charges"],
totalDiscount: json["total_discount"],
subTotal: json["sub_total"],
length: json["length"],
breadth: json["breadth"],
height: json["height"],
weight: json["weight"] == null ? null : json["weight"].toDouble(),
);