toJson method

Map<String, dynamic> toJson()

Converts the PersistentShoppingCartItem instance to a Map.

This method is used for serialization.

Implementation

Map<String, dynamic> toJson() {
  return {
    'productId': productId,
    'productName': productName,
    'productDescription': productDescription,
    'productThumbnail': productThumbnail,
    'productImages': productImages,
    'unitPrice': unitPrice,
    'quantity': quantity,
    'productDetails': productDetails,
  };
}