SDKsFlutter
Flutter SDK
Install and set up the Adopture Flutter SDK in your app.
The Adopture Flutter SDK is the fastest way to add privacy-first analytics to your Flutter app. It supports Android, iOS, and macOS.
Requirements
- Dart 3.4+
- Flutter 3.22+
Installation
Add adopture to your pubspec.yaml:
dependencies:
adopture: ^0.1.0Or install from the command line:
flutter pub add adoptureQuick Setup
Initialize the SDK in your main() function before calling runApp():
import 'package:adopture/adopture.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Adopture.init(appKey: 'ak_your_app_key_here');
runApp(MyApp());
}That's it. The SDK automatically tracks sessions, collects device context, and queues events for delivery. No additional configuration is required to get started.
Supported Platforms
| Platform | Supported |
|---|---|
| Android | Yes |
| iOS | Yes |
| macOS | Yes |
Next Steps
- Configuration — Customize flush intervals, queue sizes, and debug mode
- Tracking Events — Track custom events and screen views
- Navigation Tracking — Automatically track screen views with Navigator and GoRouter