Adapty class

Constructors

Adapty()
factory

Properties

didUpdateProfileStream Stream<AdaptyProfile>
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activate({required AdaptyConfiguration configuration}) Future<void>
Use this method to initialize the Adapty SDK.
getPaywall({required String placementId, String? locale, AdaptyPaywallFetchPolicy? fetchPolicy, Duration? loadTimeout}) Future<AdaptyPaywall>
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.
getPaywallForDefaultAudience({required String placementId, String? locale, AdaptyPaywallFetchPolicy? fetchPolicy}) Future<AdaptyPaywall>
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.
getPaywallProducts({required AdaptyPaywall paywall}) Future<List<AdaptyPaywallProduct>>
Once you have a AdaptyPaywall, 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) 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.
logShowOnboarding({String? name, String? screenName, required int screenOrder}) Future<void>
Call this method to keep track of the user’s steps while onboarding
logShowPaywall({required AdaptyPaywall paywall}) Future<void>
Call this method to notify Adapty SDK, that particular paywall was shown to user.
makePurchase({required AdaptyPaywallProduct product, AdaptyAndroidSubscriptionUpdateParameters? subscriptionUpdateParams, bool? isOfferPersonalized}) 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
presentCodeRedemptionSheet() Future<void>
Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by your app.
restorePurchases() Future<AdaptyProfile>
To restore purchases, you have to call this method.
setFallbackPaywalls(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.
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.
setVariationId(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.
toString() String
A string representation of this object.
inherited
updateAttribution(Map attribution, {required AdaptyAttributionSource source, String? networkUserId}) Future<void>
You can set attribution data for the profile, using method. Read more on the Adapty Documentation
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.

Operators

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

Static Properties

sdkVersion String
no setter