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, frommain() before runApp, and await the call before logging any events:
main.dart
KlariticsConfig
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 itsPackage.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 onKlariticsFlutter. 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