How to in-app purchase more than one product item (in Flutter)?

553 Views Asked by At

in_app_purchase docs recommend the following to initiate in-app product purchase:

final ProductDetails productDetails = ... // Saved earlier from queryProductDetails().final PurchaseParam purchaseParam = PurchaseParam(productDetails: productDetails);
if (_isConsumable(productDetails)) {
  InAppPurchase.instance.buyConsumable(purchaseParam: purchaseParam);
} else {
  InAppPurchase.instance.buyNonConsumable(purchaseParam: purchaseParam);
}

In ProductDetails there is no "quantity" field.

I want to sell from my app credits, one credit for one dollar, and allow the user to purchase multiple credits in one payment. Is it possible? How to indicate the amount of credits to purchase?

0

There are 0 best solutions below