toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['_id'] = this.sId;
  data['productId'] = this.productId;
  data['name'] = this.name;
  data['description'] = this.description;
  data['imageId'] = this.imageId;
  data['type'] = this.type;
  data['moq'] = this.moq;
  data['isOutofstock'] = this.isOutofstock;
  data['isMultiple'] = this.isMultiple;
  if (this.price != null) {
    data['price'] = this.price!.toJson();
  }
  if (this.images != null) {
    data['images'] = this.images!.map((v) => v.toJson()).toList();
  }
  data['__typename'] = this.sTypename;
  return data;
}