switchPlan static method
Future<bool>
switchPlan(
- LinkFivePlan oldPurchasePlan,
- LinkFiveProductDetails productDetails, {
- ProrationMode? prorationMode,
Handles the Switch Plan functionality.
You can switch from one Subscription plan to another. Example: from currently a 1 month subscription to a 3 months subscription on iOS: you can only switch to a plan which is in the same Subscription Family
oldPurchaseDetails
given by the LinkFive Plugin
productDetails
from the purchases you want to switch to
prorationMode
Google Only: default replaces immediately the subscription, and the remaining time will be prorated and credited to the user.
Check https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.ProrationMode for more information
Implementation
static Future<bool> switchPlan(LinkFivePlan oldPurchasePlan, LinkFiveProductDetails productDetails,
{ProrationMode? prorationMode}) {
return LinkFivePurchasesImpl().switchPlan(oldPurchasePlan, productDetails, prorationMode: prorationMode);
}