Properties
hashCode
→ int
The hash code for this object.
read-only inherited
runtimeType
→ Type
A representation of the runtime type of the object.
read-only inherited
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.
getStore ()
→ Future <Store >
getSubscriptions (List <String > skus )
→ Future <List <IAPItem > >
Retrieves subscriptions on Android
and iOS
.
initialize ()
→ Future <String ? >
Initializes iap features for both Android
and iOS
.
isReady ()
→ Future <bool >
manageSubscription (String sku , String packageName )
→ Future <bool >
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a non-existent method or property is accessed.
inherited
openPlayStoreSubscriptions ()
→ Future <bool >
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 , {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.
showInAppMessageAndroid ()
→ Future <String ? >
Android only, Google Play will show users messaging during grace period
and account hold once per day and provide them an opportunity to fix their
payment without leaving the app
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
flutter_inapp_purchase
5.3.1