InappPurchasePlatform class abstract
应用内购平台接口
- Inheritance
-
- Object
- PlatformInterface
- InappPurchasePlatform
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onProductsLoaded
→ Stream<
List< Map< >String, dynamic> > -
产品加载完成流
no setter
-
onPurchasedTransactionsUpdated
→ Stream<
Map< String, dynamic> > -
交易更新流
no setter
-
onStateChanged
→ Stream<
Map< String, dynamic> > -
状态变化流
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkSubscriptionStatus(
) → Future< bool> - 检查订阅状态
-
configure(
{required List< String> productIds, required List<String> lifetimeIds, int nonRenewableExpirationDays = 7, bool autoSortProducts = true, bool showLog = true}) → Future<void> - 配置产品
-
getAllProducts(
) → Future< List< Product> > - 获取所有产品信息
-
getAutoRenewablesProducts(
) → Future< List< Product> > - 获取自动续订订阅产品信息
-
getConsumablesProducts(
) → Future< List< Product> > - 获取消耗型产品信息
-
getLatestTransactions(
) → Future< List< Transaction> > - 获取每个产品的最新交易信息(包含已过期交易,每个ID对应一个交易)
-
getNonConsumablesProducts(
) → Future< List< Product> > - 获取非消耗型产品信息
-
getNonRenewablesProducts(
) → Future< List< Product> > - 获取非自动续订订阅产品信息
-
getPlatformVersion(
) → Future< String?> - 获取平台版本
-
getProduct(
{required String productId}) → Future< Product?> - 获取产品信息
-
getProductForVipButtonText(
{required String productId, required String langCode}) → Future< String> -
获取VIP订阅产品的按钮文本
productId产品IDlangCode语言代码,例如"en"、"zh-Hans"等 -
getProductForVipSubtitle(
{required String productId, required String periodType, required String langCode}) → Future< String> -
获取VIP订阅产品的描述
productId产品ID -
getProductForVipTitle(
{required String productId, required String periodType, required String langCode}) → Future< String> -
获取VIP订阅产品的副标题
productId产品ID -
getValidPurchasedTransactions(
) → Future< List< Transaction> > - 获取有当前有效购买交易信息
-
isEligibleForIntroOffer(
{required String productId}) → Future< bool> - 检查是否符合享受介绍性优惠资格
- 检查产品是否通过家庭共享获得
-
isPurchased(
{required String productId}) → Future< bool> - 检查产品是否已购买
-
isSubscribedButFreeTrailCancelled(
{required String productId}) → Future< bool> - 检查产品是否在有效订阅期间内但在免费试用期已取消
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
presentOfferCodeRedeemSheet(
) → Future< bool> - 打开介绍性优惠码兑换页面
-
purchase(
{required String productId}) → Future< void> - 购买产品
-
refreshPurchases(
) → Future< void> - 刷新购买交易信息
-
requestReview(
) → void - 请求应用内评价
-
restorePurchases(
) → Future< void> - 恢复购买
-
showManageSubscriptionsSheet(
) → Future< void> - 打开订阅管理页面
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ InappPurchasePlatform
-
getter/setter pair