toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  "product_id": productId,
  "price": price,
  "priceNoVat": priceNoVat,
  "title": title,
  "image": image,
  "quantity": quantity,
  "variants": variants == null ? [] : List<dynamic>.from(variants!.map((x) => x.toJson())),
  "totalItem": totalItem,
  "exemptVat": exemptVat,
  "totalPrice": totalPrice,
};