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: ^1.0

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';

...

String _qonversionUserId;

@override
void initState() {
  super.initState();
  
  _launchQonversion();
}

Future<String> _launchQonversion() async {
  _qonversionUserId = await Qonversion.launch(
    'YOUR_API_KEY',
  );
}

...

Qonversion will track purchases automatically.

If you want to use your custom user id instead of Qonversion User-Id:

final userId = 'CLIENT_SIDE_USER_ID';
Qonversion.launch(
  'YOUR_API_KEY',
  userId: userId,
);

Provide credentials

Next Steps

License

Qonversion SDK is available under the MIT license.

Last updated

Was this helpful?