Qonversion class abstract

Constructors

Qonversion()

Properties

hashCode int
The hash code for this object.
no setterinherited
promoPurchasesStream Stream<String>
Yields an event each time a promo transaction happens on iOS. Returns App Store product ID
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updatedEntitlementsStream Stream<Map<String, QEntitlement>>
Yields an event each time user entitlements update. For example, when pending purchases like SCA, Ask to buy, etc., happen.
no setter

Methods

attachUserToExperiment(String experimentId, String groupId) Future<void>
This function should be used for the test purposes only. Do not forget to delete the usage of this function before the release. Use this function to attach the user to the experiment.
attachUserToRemoteConfiguration(String remoteConfigurationId) Future<void>
This function should be used for the test purposes only. Do not forget to delete the usage of this function before the release. Use this function to attach the user to the remote configuration.
attribution(Map data, QAttributionProvider provider) Future<void>
Sends your attribution data to the provider.
checkEntitlements() Future<Map<String, QEntitlement>>
You need to call the checkEntitlements method at the start of your app to check if a user has the required entitlement.
checkTrialIntroEligibility(List<String> ids) Future<Map<String, QEligibility>>
You can check if a user is eligible for an introductory offer, including a free trial. You can show only a regular price for users who are not eligible for an introductory offer. ids products identifiers that must be checked
collectAdvertisingId() Future<void>
iOS only. Does nothing, if called on Android.
collectAppleSearchAdsAttribution() Future<void>
iOS only. Does nothing, if called on Android.
detachUserFromExperiment(String experimentId) Future<void>
This function should be used for the test purposes only. Do not forget to delete the usage of this function before the release. Use this function to detach the user from the experiment.
detachUserFromRemoteConfiguration(String remoteConfigurationId) Future<void>
This function should be used for the test purposes only. Do not forget to delete the usage of this function before the release. Use this function to detach the user from the remote configuration.
getPromotionalOffer(QProduct product, SKProductDiscount discount) Future<QPromotionalOffer?>
iOS only. Retrieve the promotional offer for the product and the product discount if it exists. Make sure to call this function before displaying product details to the user. The generated signature for the promotional offer is valid for a single transaction. If the purchase fails, you need to call this function again to obtain a new promotional offer signature. Use this signature to complete the purchase through the purchase function, along with the purchase options object. Returns the promise with the QPromotionalOffer.
identify(String userId) Future<QUser>
Call this function to link a user to his unique ID in your system and share purchase data. userId unique user ID in your system
isFallbackFileAccessible() Future<bool>
Call this function to check if the fallback file is accessible. Returns flag that indicates whether Qonversion was able to read data from the fallback file or not.
logout() Future<void>
Call this function to unlink a user from his unique ID in your system and his purchase data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offerings() Future<QOfferings>
Return Qonversion Offerings Object An offering is a group of products that you can offer to a user on a given paywall based on your business logic. For example, you can offer one set of products on a paywall immediately after onboarding and another set of products with discounts later on if a user has not converted. Offerings allow changing the products offered remotely without releasing app updates.
presentCodeRedemptionSheet() Future<void>
iOS only. Does nothing, if called on Android.
products() Future<Map<String, QProduct>>
Returns Qonversion Products in association with Google Play Store Products.
promoPurchase(String productId) Future<Map<String, QEntitlement>?>
iOS only. Returns null if called on Android.
purchase(QPurchaseModel purchaseModel) Future<Map<String, QEntitlement>>
Make a purchase and validate it through server-to-server using Qonversion's Backend. purchaseModel necessary information for purchase.
purchaseProduct(QProduct product, {QPurchaseOptions? purchaseOptions}) Future<Map<String, QEntitlement>>
Make a purchase and validate it through server-to-server using Qonversion's Backend product product to purchase. options additional options for the purchase process. Returns the promise with the user entitlements including the ones obtained by the purchase. Throws QPurchaseException in case of error in purchase flow.
purchaseWithResult(QProduct product, {QPurchaseOptions? purchaseOptions}) Future<QPurchaseResult>
Make a purchase and validate it through server-to-server using Qonversion's Backend. This method returns a QPurchaseResult containing detailed information about the purchase, including the status, entitlements, error (if any), and store transaction details.
remoteConfig({String? contextKey}) Future<QRemoteConfig>
Returns Qonversion remote config object by contextKey or default one if the key is not specified. Use this function to get the remote config with specific payload and experiment info.
remoteConfigList() Future<QRemoteConfigList>
Returns Qonversion remote config objects for all existing context key (including empty one). Use this function to get the remote configs with specific payload and experiment info.
remoteConfigListForContextKeys(List<String> contextKeys, bool includeEmptyContextKey) Future<QRemoteConfigList>
Returns Qonversion remote config objects for a list of contextKeys. Set includeEmptyContextKey to true if you want to include remote config with empty context key to the result. Use this function to get the remote configs with specific payload and experiment info.
restore() Future<Map<String, QEntitlement>>
Restoring purchases restores users purchases in your app, to maintain access to purchased content. Users sometimes need to restore purchased content, such as when they upgrade to a new phone.
setCustomUserProperty(String key, String value) Future<void>
Adds custom user property.
setUserProperty(QUserPropertyKey key, String value) Future<void>
Sets Qonversion reserved user properties, like email or user id.
syncHistoricalData() Future<void>
Call this function to sync the subscriber data with the first launch when Qonversion is implemented.
syncPurchases() Future<void>
Android only. Does nothing if called on iOS.
syncStoreKit2Purchases() Future<void>
iOS only Contact us before you start using this function Call this function to sync purchases if you are using StoreKit2 and our SDK in Analytics mode.
toString() String
A string representation of this object.
inherited
updatePurchase(QPurchaseUpdateModel purchaseUpdateModel) Future<Map<String, QEntitlement>?>
Android only. Returns null if called on iOS.
userInfo() Future<QUser>
This method returns information about the current Qonversion user.
userProperties() Future<QUserProperties>
This method returns all the properties, set for the current Qonversion user. All set properties are sent to the server with delay, so if you call this function right after setting some property, it may not be included in the result.

Operators

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

Static Methods

getSharedInstance() Qonversion
Use this variable to get a current initialized instance of the Qonversion SDK. Please, use the property only after calling Qonversion.initialize. Otherwise, trying to access the variable will cause an exception.
initialize(QonversionConfig config) Qonversion
An entry point to use Qonversion SDK. Call to initialize Qonversion SDK with required and extra configs. The function is the best way to set additional configs you need to use Qonversion SDK. You still have an option to set a part of additional configs later via calling separate setters.