InAppPurchaseConnection class

Basic API for making in app purchases across multiple platforms.

This is a generic abstraction built from billing_client_wrapers and store_kit_wrappers. Either library can be used for their respective platform instead of this.




hashCode int
The hash code for this object. [...]
read-only, inherited
purchaseUpdatedStream Stream<List<PurchaseDetails>>
Listen to this broadcast stream to get real time update for purchases. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


buyConsumable({PurchaseParam purchaseParam, bool autoConsume: true}) Future<bool>
Buy a consumable product. [...]
buyNonConsumable({PurchaseParam purchaseParam}) Future<bool>
Buy a non consumable product or subscription. [...]
completePurchase(PurchaseDetails purchase, {String developerPayload}) Future<BillingResultWrapper>
Mark that purchased content has been delivered to the user. [...]
consumePurchase(PurchaseDetails purchase, {String developerPayload}) Future<BillingResultWrapper>
(Play only) Mark that the user has consumed a product. [...]
isAvailable() Future<bool>
Returns true if the payment platform is ready and available.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
queryPastPurchases({String applicationUserName}) Future<QueryPurchaseDetailsResponse>
Query all previous purchases. [...]
queryProductDetails(Set<String> identifiers) Future<ProductDetailsResponse>
Query product details for the given set of IDs. [...]
refreshPurchaseVerificationData() Future<PurchaseVerificationData>
(App Store only) retry loading purchase data after an initial failure. [...]
toString() String
Returns a string representation of this object.


operator ==(dynamic other) bool
The equality operator. [...]

Static Properties

enablePendingPurchase bool
Whether pending purchase is enabled. [...]
instance InAppPurchaseConnection
The InAppPurchaseConnection implemented for this platform. [...]

Static Methods

enablePendingPurchases() → void
Enable the InAppPurchaseConnection to handle pending purchases. [...]