0

I'm using in_app_purchase: ^0.3.4+12 and flutter 1.22.0

I need to add multiple quantities of a consumable product. I know that in_app_purchase plugin exposes multiple StoreKit Wrappers and SKPaymentWrapper is the one for quantity. But, I don't know how to implement it.


_buyProduct(ProductDetails(
        id: productid,
        title: title
        description: description
        price: "₹159",
      ));

void _buyProduct(ProductDetails prod) {
    
    final PurchaseParam purchaseParam =
        PurchaseParam(productDetails: prod, sandboxTesting: true);

       
     _iap.buyConsumable(purchaseParam: purchaseParam).catchError((onError) => print(onError.toString()));
  }

final SKPaymentWrapper payDetails = SKPaymentWrapper(
        productIdentifier: productid,
        quantity: 2,
        simulatesAskToBuyInSandbox: true);

0 Answers0