Price.fromJson constructor

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

Implementation

Price.fromJson(Map<String, dynamic> json) {
  sellingPrice = json['sellingPrice'].toDouble();
  mrp = json['mrp'].toDouble();
  discount = json['discount'] != null ? json['discount'].toDouble() : 0;
  minPrice = json['minPrice'].toDouble();
  maxPrice = json['maxPrice'].toDouble();
  type = json['type'];
  isSamePrice = json['isSamePrice'];
  sTypename = json['__typename'];
}