InAppPurchaseAndroidPlatform class

An InAppPurchasePlatform that wraps Android BillingClient.

This translates various BillingClient calls and responses into the generic plugin API.

Inheritance
  • Object
  • PlatformInterface
  • InAppPurchaseAndroidPlatform

Constructors

InAppPurchaseAndroidPlatform({@visibleForTesting BillingClientManager? manager})
Creates a new InAppPurchaseAndroidPlatform instance, and configures it for use.

Properties

billingClientManager BillingClientManager
The BillingClient that's abstracted by GooglePlayConnection.
final
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.
latefinal
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<BillingResultWrapper>
Mark that purchased content has been delivered to the user.
countryCode() Future<String>
Returns the user's country.
inherited
getCountryCode() Future<String>
Returns Play billing country code based on ISO-3166-1 alpha2 format.
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>
Performs a network query for the details of products available.
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 Methods

registerPlatform() → void
Registers this class as the default instance of InAppPurchasePlatform.