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() → 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.
getPaywallProducts({required AdaptyPaywall paywall}) Future<List<AdaptyPaywallProduct>>
Once you have a AdaptyPaywall, fetch corresponding products array using this method.
getProductsIntroductoryOfferEligibility({required List<AdaptyPaywallProduct> products}) Future<Map<String, AdaptyEligibility>>
Once you have an AdaptyPaywallProduct array, fetch introductory offers information for this products.
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.
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<AdaptyProfile?>
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 paywalls) 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.
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

Constants

sdkVersion → const String