LinkFivePurchasesImpl class

Inheritance
Implemented types
Available extensions

Constructors

LinkFivePurchasesImpl.new()
factory
LinkFivePurchasesImpl.testing({required InAppPurchase inAppPurchaseInstance, LinkFiveClientInterface? linkFiveClient, LinkFiveBillingClientInterface? linkFiveBillingClient})
TEST CONSTRUCTOR. Please do not use.

Properties

activeProducts Stream<LinkFiveActiveProducts>
All active Products the user purchased
no setter
appDataStore LinkFiveAppDataStore
Settings data memory storage
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
inAppPurchaseInstance → InAppPurchase
InAppPurchase instance
final
initialIsPurchaseInProgress bool
initial value for purchase in Progress
finalinherited
initialPurchaseState PurchaseState
initial value for purchase Success
finalinherited
isInitialized Completer<bool>
Will be true whenever LinkFive is done initializing
final
isPendingPurchase bool
Sets the value and updates all Stream listeners
getter/setter pairinherited
isTestBillingClient bool
Testing Getter
no setter
isTestClient bool
Testing Getter
no setter
products Stream<LinkFiveProducts>
All available Products you can offer for purchase to your users
no setter
purchaseState PurchaseState
Sets the value and updates all Stream listeners
no getterinherited
registeredPurchaseCompleterList List<Completer<LinkFiveActiveProducts>>
the v2 of purchases waits for the async purchase response and completes the future
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchProducts() Future<LinkFiveProducts?>
Fetches the subscriptions from LinkFive and retrieves the IAP from the platform
finishInitialize() → void

Available on LinkFivePurchasesImpl, provided by the LinkFiveInitilizeExtension extension

This will complete the Initialization process
handleAndroidSwitchPlan(LinkFivePlan oldLinkFivePlan, LinkFiveProductDetails productDetails, {ProrationMode? prorationMode}) Future<bool>

Available on LinkFivePurchasesImpl, provided by the UpgradeDowngradePurchases extension

Handles the Up and Downgrade of a Subscription plan oldPurchaseDetails given by the LinkFive Plugin productDetails from the purchases you want to switch to prorationMode 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
handleIosSwitchPlan(LinkFiveProductDetails productDetails) Future<bool>

Available on LinkFivePurchasesImpl, provided by the UpgradeDowngradePurchases extension

Handles the Up and Downgrade of a Subscription plans Apple does not need the existing plan.
init(String apiKey, {LinkFiveLogLevel logLevel = LinkFiveLogLevel.WARN, LinkFiveEnvironment env = LinkFiveEnvironment.PRODUCTION}) Future<LinkFiveActiveProducts>
Initialize the LinkFive client with .init(...)
loadSubscriptions() Future<bool>
This method overrides the interface to fetch the subscriptions on view.
override
makeSureIsInitialize() → void

Available on LinkFivePurchasesImpl, provided by the LinkFiveInitilizeExtension extension

For some cases, we want to make sure that LinkFive is initialized
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purchase(dynamic productDetails) Future<bool>
Make a purchase
override
purchaseFuture(dynamic productDetails) Future<LinkFiveActiveProducts>
USE WITH CARE. We're currently testing the new purchase method
purchaseInProgressStream() Stream<bool>
inherited
purchaseStateStream() Stream<PurchaseState>
inherited
reloadActivePlans() Future<LinkFiveActiveProducts>
restore() Future<bool>
Restore all made purchases
override
restoreWithFuture() Future<LinkFiveActiveProducts>
USE WITH CARE. We're currently testing the new restore method
setEnvironment(String? environment) Future<void>
setUserId(String? userId) Future<LinkFiveActiveProducts>
Customer User Id
setUTMSource(String? utmSource) Future<void>
switchPlan(LinkFivePlan oldLinkFivePlan, LinkFiveProductDetails productDetails, {ProrationMode? prorationMode}) Future<bool>
Handles the Up and Downgrade of a Subscription plans
toString() String
A string representation of this object.
inherited
updateStateFromActiveProducts(LinkFiveActiveProducts activeProducts) → dynamic
Whenever the plugin receives a new active Products we will update the state to either
inherited
waitForInit() Future<void>

Available on LinkFivePurchasesImpl, provided by the LinkFiveInitilizeExtension extension

Sometimes, the Plugin just needs to wait until the

Operators

operator ==(Object other) bool
The equality operator.
inherited