Order.fromJson constructor

Order.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Order.fromJson(Map<String, dynamic> json) {
  orderId = json['orderId'];
  orderDate = json['orderDate'];
  orderStatus = json['orderStatus'];
  orderType = json['orderType'] != null ? json['orderType'] : 1;
  totalAmount =
      json['totalAmount'] != null ? json['totalAmount'].toDouble() : 0.0;
  shippingFees =
      json['shippingFees'] != null ? json['shippingFees'].toDouble() : 0.0;
  sId = json['_id'];
  price = json['price'] != null ? new Price.fromJson(json['price']) : null;
  sTypename = json['__typename'];
}