toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['sku'] = this.sku;
  data['imageId'] = this.imageId;
  data['styleCode'] = this.styleCode;
  data['skuId'] = this.skuId;
  if (this.attribute != null) {
    data['attribute'] = this.attribute!.map((v) => v.toJson()).toList();
  }
  if (this.category != null) {
    data['category'] = this.category!.map((v) => v.toJson()).toList();
  }
  if (this.brand != null) {
    data['brand'] = this.brand!.toJson();
  }
  data['productDimension'] = this.productDimension;
  data['packingDimension'] = this.packingDimension;
  data['weight'] = this.weight;
  data['productId'] = this.productId;
  data['type'] = this.type;
  data['isMultiple'] = this.isMultiple;
  data['productName'] = this.productName;
  data['imageUrl'] = this.imageUrl;
  data['productDescription'] = this.productDescription;
  if (this.price != null) {
    data['price'] = this.price!.toJson();
  }
  data['qty'] = this.qty;
  data['__typename'] = this.sTypename;
  return data;
}