IAPHelper class
- 大致流程 * 1、初始化、加载Products identifier List 2、业务发起支付,检查是否当前正在处理,检查Products identifier List加载状态 3、处理付款回调,过程: a、cancel/error的直接complete,并发出signal b、purchased的校验付款时间,校验失败直接return,并complete c、purchased的校验成功,调用当前流程中给定的IapPurchaseValidator实例 d、IapPurchaseValidator实例校验结果回调后,IAPHelper处理校验结果和缓存状态 4、发出处理结果signal
- Available extensions
Constructors
- IAPHelper.new()
-
factory
Properties
- config → IAPConfig
-
Available on IAPHelper, provided by the Getters extension
no setter -
detailsStream
→ Stream<
List< PurchaseDetails> > -
Available on IAPHelper, provided by the Getters extension
no setter -
errorStream
→ Stream<
IapErrorResult> -
Available on IAPHelper, provided by the Getters extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
isAvailable
→ Future<
bool> -
Available on IAPHelper, provided by the Getters extension
no setter -
products
→ List<
ProductDetails> -
Available on IAPHelper, provided by the Getters extension
no setter -
productsStream
→ Stream<
List< ProductDetails> > -
Available on IAPHelper, provided by the Getters extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unverifiedPurchasesCacheKey → String
-
final
Methods
-
buy(
String productId, {bool isConsumable = false, required IapPurchaseValidator purchaseValidator}) → Future< bool> -
Available on IAPHelper, provided by the PublicOfBuy extension
Buying item with productId. -
dispose(
) → dynamic -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reloadProductIdentifier(
Set< String> identifiers) → dynamic -
restorePurchases(
) → dynamic -
setup(
{required IAPConfig config}) → dynamic -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
no setter