SDKs
Flutter
A pure Dart package for iOS and Android. Web is best effort.
Early access
The Flutter SDK is in early access. The API on this page is stable; package versions may still move quickly.
Install
flutter pub add uncorrelateInitialize
import 'package:uncorrelate/uncorrelate.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Uncorrelate.init('uc_pub_prod_…', debug: kDebugMode);
runApp(const MyGame());
}Track, identify, reset
Uncorrelate.track('level_complete', {'level': 42, 'stars': 2});
Uncorrelate.identify(user.id, {'cohort': 'winter_26'});
Uncorrelate.reset(); // on logoutPurchases
With in_app_purchase, send each completed purchase with what the store returned:
for (final p in purchaseDetailsList) {
if (p.status == PurchaseStatus.purchased) {
Uncorrelate.purchase(
store: Platform.isIOS ? UCStore.appStore : UCStore.googlePlay,
sku: p.productID,
transactionId: p.purchaseID!,
price: product.rawPrice,
currency: product.currencyCode,
receipt: p.verificationData.serverVerificationData,
);
}
}On iOS, serverVerificationData is the StoreKit 2 JWS when StoreKit 2 is enabled, otherwise the app receipt. On Android it is the purchase token. Both are accepted as-is.
What the SDK does for you
Same as Unity: an on-disk queue (JSONL segments via path_provider), batches of up to 500 events, gzip, retries with backoff, sessions from the app lifecycle and a flush when the app is paused. Device context comes from device_info_plus and package_info_plus when they are present.