Skip to main content
The Klaritics Flutter SDK is a Dart wrapper around the native Klaritics Android and iOS SDKs. A single call from Dart initializes both platforms, so you add no setup code to your Activity, Application, or AppDelegate. Package: klaritics_flutter · Version: 1.0.0

Requirements

You need a Project ID and a Host URL from the Klaritics dashboard. Your project ID is on the Getting Started page.

Add the dependency

pubspec.yaml

Initialize the SDK

Initialize once, from main() before runApp, and await the call before logging any events:
main.dart

KlariticsConfig

Because initialization happens from Dart, don’t call the native Klaritics.setup(...) in your Android Activity or Application, or in your iOS AppDelegate.

Android setup

1

Add the Klaritics Maven repository

Add it to the repositories block in android/build.gradle (or settings.gradle):
android/build.gradle
2

Add the native SDK dependency

app/build.gradle
3

Configure ProGuard

If you use ProGuard, add to proguard-rules.pro:
proguard-rules.pro

iOS setup

The plugin declares the native Klaritics iOS SDK in its Package.swift. With Flutter’s Swift Package Manager support enabled, it’s added to your iOS app automatically. No AppDelegate changes are required.

API reference

All methods are called on KlariticsFlutter. Attributes are Map<String, dynamic>.

Common recipes

Log an event

Identify a user and set attributes

The SDK captures a device ID automatically. Add your own identifier when you want to follow a specific user’s journey:

Track a screen

Troubleshooting

Next steps

Verify your integration

Send test events from your app and watch them land on the Getting Started page.

Release notes

What changed in each Flutter SDK version.

Package: klaritics_flutter · Version: 1.0.0 · Flutter: 3.0.1+ · Release notes