InAppPurchase class

Basic API for making in app purchases across multiple platforms.

Properties

hashCode int
The hash code for this object.
no setterinherited
purchaseStream Stream<List<PurchaseDetails>>
Listen to this broadcast stream to get real time update for purchases.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buyConsumable({required PurchaseParam purchaseParam, bool autoConsume = true}) Future<bool>
Buy a consumable product.
buyNonConsumable({required PurchaseParam purchaseParam}) Future<bool>
Buy a non consumable product or subscription.
completePurchase(PurchaseDetails purchase) Future<void>
Mark that purchased content has been delivered to the user.
countryCode() Future<String>
Returns the user's country.
getPlatformAddition<T extends InAppPurchasePlatformAddition?>() → T
Provides a platform-specific implementation of the InAppPurchasePlatformAddition class.
isAvailable() Future<bool>
Returns true if the payment platform is ready and available.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryProductDetails(Set<String> identifiers) Future<ProductDetailsResponse>
Query product details for the given set of IDs.
restorePurchases({String? applicationUserName}) Future<void>
Restore all previous purchases.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance InAppPurchase
The instance of the InAppPurchase to use.
no setter