LinkFivePurchasesImpl class

Inheritance
Implemented types
Available Extensions

Constructors

LinkFivePurchasesImpl()
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
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
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

Operators

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