Requirements
Before integrating the AppDNA Flutter SDK, ensure your project meets the following minimum requirements:| Requirement | Minimum Version |
|---|---|
| Dart | 3.0+ |
| Flutter | 3.10+ |
| iOS | 15.0+ |
| Android minSdk | 24 |
Installation
Add the AppDNA SDK to yourpubspec.yaml:
Architecture
Theappdna_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:| Channel | Type | Purpose |
|---|---|---|
com.appdna.sdk/main | MethodChannel | Primary SDK operations |
com.appdna.sdk/billing | MethodChannel | Billing and purchase operations |
com.appdna.sdk/web_entitlement | EventChannel | Web entitlement change stream |
com.appdna.sdk/push_received | EventChannel | Push notification received stream |
com.appdna.sdk/push_tapped | EventChannel | Push notification tapped stream |
com.appdna.sdk/entitlements | EventChannel | Entitlement 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:Verify Installation
After adding the dependency, verify the SDK is correctly installed by printing the version:You should see
1.0.0 printed in the debug console. If the import fails, run flutter pub get again and restart your IDE.