OrderItem.fromJson constructor

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

Implementation

OrderItem.fromJson(Map<String, dynamic> json) {
  quantity = json['quantity'];
  comments = json['comments'];
  variant = json['variant'];
  variantValue = json['variantValue'];
  price = json['price'].toDouble();
  piece = json['piece'];
  igst = json['igst'].toDouble();
  cgst = json['cgst'].toDouble();
  sgst = json['sgst'].toDouble();
  pack = json['pack'] != null ? new Pack.fromJson(json['pack']) : null;
  sets = json['set'] != null ? new Set.fromJson(json['set']) : null;
  // sTypename = json['__typename'];
}