Adopture Docs
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.0

Or install from the command line:

flutter pub add adopture

Quick 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

PlatformSupported
AndroidYes
iOSYes
macOSYes

Next Steps

On this page