switchPlan method
dynamic
switchPlan(
- LinkFivePlan oldPurchasePlan,
- LinkFiveProductDetails productDetails, {
- ProrationMode? prorationMode,
H andles 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
oldPurchasePlan
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
switchPlan(
LinkFivePlan oldPurchasePlan, LinkFiveProductDetails productDetails,
{ProrationMode? prorationMode}) {
return LinkFivePurchases.switchPlan(oldPurchasePlan, productDetails,
prorationMode: prorationMode);
}