PurchaseProduct.wallet constructor
const
PurchaseProduct.wallet({})
Define chargeable items.
PurchaseProduct.wallet] to create a wallet type billing item, PurchaseProduct.unlock to create a feature unlock type billing item, PurchaseProduct.subscription to Create a subscription with PurchaseProduct.subscription.
Be sure to match productId with the store's ID.
price is overwritten when a charged item is loaded from the store. title and description can be retrieved from titleOnStore and descriptionOnStore loaded from the store.
課金アイテムの定義を行います。
PurchaseProduct.walletでウォレットタイプの課金アイテムを作成し、PurchaseProduct.unlockで機能アンロックタイプの課金アイテムを作成、PurchaseProduct.subscriptionでサブスクリプションを作成します。
productIdをストア側のIDと必ず合わせるようにしてください。
priceは課金アイテムをストアからロードした際に上書きされます。titleやdescriptionはtitleOnStoreやdescriptionOnStoreでストアからロードしたものを取得できます。
Implementation
const PurchaseProduct.wallet({
required this.productId,
required double amount,
required this.price,
String title = "",
String description = "",
this.icon,
String? priceText,
this.debugForcePurchased = false,
this.priceBuilder,
this.offerIds = const [],
}) : type = PurchaseProductType.consumable,
subscriptionPeriod = PurchaseSubscriptionPeriod.none,
expiredPeriod = null,
_priceText = priceText,
amount = amount,
_title = title,
_description = description,
_debugConsumeWhenPurchaseCompleted = false;