purchasePackage method
- Package package
Purchase a specific package. Throws on user cancellation so the UI can handle the error distinctly; returns the updated customer info on success. RevenueCat delivers the receipt to our backend via webhook — we do not validate here.
Implementation
Future<CustomerInfo> purchasePackage(Package package) async {
_requireConfigured();
final result = await _purchases.purchase(PurchaseParams.package(package));
return result.customerInfo;
}