Product.fromJson constructor

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

Implementation

Product.fromJson(Map<String, dynamic> json) {
  sId = json['_id'];
  productId = json['productId'];
  name = json['name'];
  description = json['description'];
  imageId = json['imageId'];
  type = json['type'];
  moq = json['moq'];
  isOutofstock = json['isOutofstock'];
  isMultiple = json['isMultiple'];
  price = json['price'] != null ? new Price.fromJson(json['price']) : null;
  if (json['images'] != null) {
    images = <Images>[];
    json['images'].forEach((v) {
      images!.add(new Images.fromJson(v));
    });
  }
  sTypename = json['__typename'];
}