LinkFivePurchases class
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
activeProducts
→ Stream<
LinkFiveActiveProducts> -
If the user has an active verified purchase, the stream will contain all necessary information
An active product is a verified active subscription the user purchased
no setter
- callbackInterface → LinkFivePurchasesImpl
-
This is the callback Interface for the UI Paywall plugin
no setter
-
products
→ Stream<
LinkFiveProducts> -
This Stream contains all available Products you can offer to your user.
no setter
-
purchaseInProgressStream
→ Stream<
bool> -
This Stream returns true => if the purchase is currently in Progress. This means you should show a loading
indicator or block the purchase button while processing
no setter
Static Methods
-
fetchProducts(
) → Future< LinkFiveProducts?> - By Default, the plugin does not fetch any Products to offer.
-
init(
String apiKey, {LinkFiveLogLevel logLevel = LinkFiveLogLevel.WARN}) → Future< LinkFiveActiveProducts> - Initialize LinkFive with your Api Key
-
purchase(
ProductDetails productDetails) → Future< bool> - This will trigger the purchase flow for the user.
-
purchaseFuture(
dynamic productDetails) → Future< LinkFiveActiveProducts> - USE WITH CARE. We're currently testing the new purchase method
-
reloadActivePlans(
) → Future< LinkFiveActiveProducts> - This will reload all active Plans for the current user
-
restore(
) → Future< bool> - This will restore the subscriptions a user previously purchased.
-
restoreFuture(
) → Future< LinkFiveActiveProducts> - USE WITH CARE. We're currently testing the new restore method
-
setEnvironment(
String? environment) → dynamic - Set your own environment. Example: Production, Staging
-
setUserId(
String? userId) → Future< LinkFiveActiveProducts> - Set your own user ID
-
setUTMSource(
String? utmSource) → dynamic - Set the UTM source of a user You can filter this value in your playout
-
switchPlan(
LinkFivePlan oldPurchasePlan, LinkFiveProductDetails productDetails, {ProrationMode? prorationMode}) → Future< bool> - Handles the Switch Plan functionality.