Skip to main content

Requirements

Before integrating the AppDNA Flutter SDK, ensure your project meets the following minimum requirements:
RequirementMinimum Version
Dart3.0+
Flutter3.10+
iOS15.0+
Android minSdk24
The Flutter SDK is a thin platform channel wrapper. All core logic is delegated to the native iOS and Android SDKs under the hood. Your project must meet the native platform requirements as well.

Installation

Add the AppDNA SDK to your pubspec.yaml:
dependencies:
  appdna_sdk: ^1.0.0
Then install dependencies:
flutter pub get

Architecture

The appdna_sdk package uses Flutter platform channels to delegate all logic to the native iOS and Android SDKs. The Dart layer is intentionally thin — it marshals method calls and streams events from the native side.

Platform Channels

The SDK registers the following platform channels:
ChannelTypePurpose
com.appdna.sdk/mainMethodChannelPrimary SDK operations
com.appdna.sdk/billingMethodChannelBilling and purchase operations
com.appdna.sdk/web_entitlementEventChannelWeb entitlement change stream
com.appdna.sdk/push_receivedEventChannelPush notification received stream
com.appdna.sdk/push_tappedEventChannelPush notification tapped stream
com.appdna.sdk/entitlementsEventChannelEntitlement changes stream
You do not need to interact with platform channels directly. The AppDNA class and its module accessors provide a high-level Dart API that wraps all channel communication.

Import

Import the SDK in any Dart file where you need to use it:
import 'package:appdna_sdk/appdna_sdk.dart';

Verify Installation

After adding the dependency, verify the SDK is correctly installed by printing the version:
import 'package:appdna_sdk/appdna_sdk.dart';

void main() async {
  final version = await AppDNA.getSdkVersion();
  print(version); // "1.0.0"
}
You should see 1.0.0 printed in the debug console. If the import fails, run flutter pub get again and restart your IDE.

Next Steps

Once the SDK is installed, proceed to the Quickstart guide to configure the SDK and start tracking events.