toMap method

Map<String, dynamic> toMap()

Converts the Product object into a Map for communication via MethodChannel.

This is useful when passing data between Flutter and native platforms.

Implementation

Map<String, dynamic> toMap() {
  return {
    "skuId": skuId,
    "price": price,
    "quantity": quantity,
    "merchantId": merchantId,
  };
}