Flutter SDK

Guide for installing the Qonversion SDK for Flutter

Installation

To use Qonversion in your Flutter app, add qonversion as a dependency in your pubspec.yaml file:

dependencies:
qonversion_flutter: ^0.2

Run flutter pub get to install dependency.

Usage

You need to configure Qonversion once at a starting point of your app.

For example, launch Qonversion in initState of your top level widget:

...
import 'package:qonversion_flutter/qonversion.dart';
...
​
void initState() {
super.initState();
Qonversion.launchWith(
iosApiKey: 'YOUR_IOS_API_KEY',
androidApiKey: 'YOUR_ANDROID_API_KEY',
onComplete: (uid) => print(uid),
);
}
​
...

Usually Qonversion will track purchases automatically.

Still, there are few ways to launch Qonversion:

1.Launches Qonversion SDK with the given API keys for each platform: [androidApiKey] and [iosApiKey] respectively. [onComplete] will return uid for Ads integrations.

static Future<void> launchWith({
String androidApiKey,
String iosApiKey,
void Function(String) onComplete,
})

2. Same as previous but allows you to specify client side userid (instead of Qonversion user-id) that will be used for matching data in the third party data:

static Future<void> launchWithClientSideUserId(
String userID, {
String androidApiKey,
String iosApiKey,
})

3. Under development. Same as previous but allows you to turn off auto tracking purchases and track it manually.

static Future<void> launchWithAutoTrackPurchases(
bool autoTrackPurchases, {
String androidApiKey,
String iosApiKey,
void Function(String) onComplete,
})

Provide credentials

90% Done!

From now on, Qonversion will track subscription events independent from a user's device (e.g., if the app was not opened or even deleted).

Next Steps

License

Qonversion SDK is available under the MIT license.