OrderItem.fromJson constructor
OrderItem.fromJson(
- String json
Implementation
OrderItem.fromJson(String json) {
Map<String, dynamic> map = jsonDecode(json);
id = map["id"];
itemId = map["item_id"];
orderId = map["order_id"];
name = map["name"];
selections = Selections.fromJson(map["selections"]);
specialInstructions = map["special_instructions"];
quantity = map["quantity"];
amount = map["amount"] is int ? (map["amount"] as int).toDouble() : map["amount"];
}