Adapty class
Methods
activate ({required AdaptyConfiguration configuration })
→ Future <void >
Use this method to initialize the Adapty SDK.
createWebPaywallUrl ({AdaptyFlowPaywall ? paywall , AdaptyPaywallProduct ? product })
→ Future <String >
getCurrentInstallationStatus ()
→ Future <AdaptyInstallationStatus >
Returns the current state of the installation details collected by Adapty Attribution.
getFlow ({required String placementId , String ? locale , AdaptyFlowFetchPolicy ? fetchPolicy , Duration ? loadTimeout })
→ Future <AdaptyFlow >
Adapty allows you remotely configure the products that will be displayed in your app.
This way you don’t have to hardcode the products and can dynamically change offers or run A/B tests without app releases.
getFlowForDefaultAudience ({required String placementId , String ? locale , AdaptyFlowFetchPolicy ? fetchPolicy })
→ Future <AdaptyFlow >
This method enables you to retrieve the paywall from the Default Audience without having to wait for the Adapty SDK to send all the user information required for segmentation to the server.
getOnboarding ({required String placementId , String ? locale , AdaptyFlowFetchPolicy ? fetchPolicy , Duration ? loadTimeout })
→ Future <AdaptyOnboarding >
getOnboardingForDefaultAudience ({required String placementId , String ? locale , AdaptyFlowFetchPolicy ? fetchPolicy })
→ Future <AdaptyOnboarding >
getPaywallProducts ({required AdaptyFlow flow })
→ Future <List <AdaptyPaywallProduct > >
Once you have a AdaptyFlow , fetch corresponding products array using this method.
getProfile ()
→ Future <AdaptyProfile >
The main function for getting a user profile. Allows you to define the level of access, as well as other parameters.
identify (String customerUserId , {String ? iosAppAccountToken , String ? androidObfuscatedAccountId })
→ Future <void >
Use this method for identifying user with it’s user id in your system.
isActivated ()
→ Future <bool >
Returns true if the native SDK is activated and the plugin is activated.
logout ()
→ Future <void >
You can logout the user anytime by calling this method.
logShowFlow ({required AdaptyFlow flow })
→ Future <void >
Call this method to notify Adapty SDK, that particular paywall was shown to user.
makePromotedPurchase ({required AdaptyPromotedProduct product })
→ Future <AdaptyPurchaseResult >
Continue a promoted purchase received from the App Store. iOS only.
makePurchase ({required AdaptyPaywallProduct product , AdaptyPurchaseParameters ? parameters })
→ Future <AdaptyPurchaseResult >
To make the purchase, you have to call this method.
Read more on the Adapty Documentation
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openWebPaywall ({AdaptyFlowPaywall ? paywall , AdaptyPaywallProduct ? product , AdaptyWebPresentation openIn = AdaptyWebPresentation.externalBrowser })
→ Future <void >
presentCodeRedemptionSheet ()
→ Future <void >
Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by your app.
reportTransaction ({required String transactionId , String ? variationId })
→ Future <void >
In Observer mode, Adapty SDK doesn’t know, where the purchase was made from.
If you display products using our Paywalls or A/B Tests , you can manually assign variation to the purchase.
After doing this, you’ll be able to see metrics in Adapty Dashboard.
restorePurchases ()
→ Future <AdaptyProfile >
To restore purchases, you have to call this method.
setFallback (String assetId )
→ Future <void >
To set fallback paywalls, use this method. You should pass exactly the same payload you’re getting from Adapty backend. You can copy it from Adapty Dashboard.
setIntegrationIdentifier ({required String key , required String value })
→ Future <void >
You can set integration identifiers for the profile, using method.
setLogLevel (AdaptyLogLevel value )
→ Future <void >
Set to the most appropriate level of logging.
setupAfterHotRestart ()
→ void
Use this method to initialize the plugin after hot restart. Please check isActivated before calling this method. Don't use this method in release builds.
toString ()
→ String
A string representation of this object.
inherited
updateCollectingRefundDataConsent (bool consent )
→ Future <void >
updateExternalAttribution (Map attribution , {required AdaptyExternalAttributionProvider provider })
→ Future <void >
Sends external attribution data for the current profile.
updateProfile (AdaptyProfileParameters params )
→ Future <void >
You can set optional attributes such as email, phone number, etc, to the user of your app.
You can then use attributes to create user segments or just view them in CRM.
updateRefundPreference (AdaptyRefundPreference refundPreference )
→ Future <void >
adapty_flutter_kids 4.1.0