purchase method
- StoreProduct product, {
- String? promotionalOfferId,
- SubscriptionOption? option,
Purchases product (optionally via a specific Android option),
unpacking productId/productType/basePlanId/offerId for the
platform-interface call — callers work with the public StoreProduct
/ SubscriptionOption models, never raw ids, matching the Swift/Kotlin
façades' ergonomics rather than the wire shape.
Implementation
Future<PurchaseResult> purchase(
StoreProduct product, {
String? promotionalOfferId,
SubscriptionOption? option,
}) =>
_platform.purchase(
product.id,
product.type,
promotionalOfferId: promotionalOfferId,
basePlanId: option?.basePlanId,
offerId: option?.offerId,
);