class OrderDetailItem{ int? qty; dynamic amount; dynamic discount; dynamic total; OrderMedicineItem? medicine; OrderDetailItem.fromJson(Map json){ qty = json["quantity"] ?? 0; amount = json["amount"] ?? 0; discount = json["discount"] ?? 0; total = json["total"] ?? 0; medicine = (json["medicine"] != null) ? OrderMedicineItem.fromJson(json["medicine"]) : null; } } class OrderMedicineItem{ String? name; OrderMedicineItem.fromJson(Map json){ name = json["medicineName"] ?? ""; } }