consumePurchase method

Future<BillingResultWrapper> consumePurchase(
  1. PurchaseDetails purchase
)

Mark that the user has consumed a product.

You are responsible for consuming all consumable purchases once they are delivered. The user won't be able to buy the same product again until the purchase of the product is consumed.

Implementation

Future<BillingResultWrapper> consumePurchase(PurchaseDetails purchase) {
  return _billingClientManager.runWithClient(
    (BillingClient client) =>
        client.consumeAsync(purchase.verificationData.serverVerificationData),
  );
}