FlutterInappPurchase class
Methods
-
acknowledgePurchaseAndroid(String token)
→ Future<String?>
-
Acknowledge a purchase on
Android
.
-
checkSubscribed({required String sku, Duration duration = const Duration(days: 30), Duration grace = const Duration(days: 3)})
→ Future<bool>
-
Check if a subscription is active on
Android
and iOS
.
-
clearTransactionIOS()
→ Future<String?>
-
Clear all remaining transaction on
iOS
.
-
consumeAll()
→ Future
-
Consumes all items on
Android
.
-
consumePurchaseAndroid(String token)
→ Future<String?>
-
Consumes a purchase on
Android
.
-
finalize()
→ Future<String?>
-
End Play Store connection on
Android
and remove iap observer in iOS
.
-
finishTransaction(PurchasedItem purchasedItem, {bool isConsumable = false})
→ Future<String?>
-
Finish a transaction on both
android
and iOS
.
-
finishTransactionIOS(String transactionId)
→ Future<String?>
-
Finish a transaction on
iOS
.
-
getAppStoreInitiatedProducts()
→ Future<List<IAPItem>>
-
Retrieves a list of products that have been attempted to purchase through the App Store
iOS
only.
-
getAvailablePurchases()
→ Future<List<PurchasedItem>?>
-
Get all non-consumed purchases made on
Android
and iOS
.
-
getPendingTransactionsIOS()
→ Future<List<PurchasedItem>?>
-
Get the pending purchases in IOS.
-
getProducts(List<String> skus)
→ Future<List<IAPItem>>
-
Retrieves a list of products from the store on
Android
and iOS
.
-
getPromotedProductIOS()
→ Future<String?>
-
Add Store Payment (iOS only)
Indicates that the App Store purchase should continue from the app instead of the App Store.
-
getPurchaseHistory()
→ Future<List<PurchasedItem>?>
-
Retrieves the user's purchase history on
Android
and iOS
regardless of consumption status.
-
getSubscriptions(List<String> skus)
→ Future<List<IAPItem>>
-
Retrieves subscriptions on
Android
and iOS
.
-
initialize()
→ Future<String?>
-
Initializes iap features for both
Android
and iOS
.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
requestProductWithOfferIOS(String sku, String forUser, Map<String, dynamic> withOffer)
→ Future
-
Buy product with offer
-
requestPromotedProductIOS()
→ Future
-
Add Store Payment (iOS only)
Indicates that the App Store purchase should continue from the app instead of the App Store.
-
requestPurchase(String sku, {String? obfuscatedAccountId, String? purchaseTokenAndroid, String? obfuscatedProfileIdAndroid})
→ Future
-
Request a purchase on
Android
or iOS
.
Result will be received in purchaseUpdated
listener or purchaseError
listener.
-
requestPurchaseWithQuantityIOS(String sku, int quantity)
→ Future
-
Buy product with quantity
-
requestSubscription(String sku, {String? oldSkuAndroid, int? prorationModeAndroid, String? obfuscatedAccountIdAndroid, String? obfuscatedProfileIdAndroid, String? purchaseTokenAndroid})
→ Future
-
Request a subscription on
Android
or iOS
.
Result will be received in purchaseUpdated
listener or purchaseError
listener.
-
showPromoCodesIOS()
→ Future<String>
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
validateReceiptAndroid({required String packageName, required String productId, required String productToken, required String accessToken, bool isSubscription = false})
→ Future<Response>
-
Validate receipt in android
-
validateReceiptIos({required Map<String, String> receiptBody, bool isTest = true})
→ Future<Response>
-
Validate receipt in ios