Skip to content
Docs
Documentation/Mobile SDKs
Mobile SDKs

Flutter

Add the Flutter source plugin for Aplyna's iOS StoreKit billing pilot, purchases, restores and entitlement checks, plus iOS/Android events and configuration.

On this page Install the pluginSend an eventShared methods

Install the plugin

Package: aplyna · version 1.0.1 on pub.dev. Import: package:aplyna/aplyna.dart. Requires Dart 3.5+ and Flutter 3.24+.

Install
flutter pub add aplyna
pubspec.yaml
dependencies:
  aplyna: ^1.0.1

Send an event

Dart
import 'package:aplyna/aplyna.dart';

final installationId = await Aplyna.configure(apiKey: 'YOUR_APP_SDK_KEY');
// Only after your application permits tracking:
await Aplyna.setConsent(true);
await Aplyna.track('app_opened');
await Aplyna.flush();

configure returns a persistent anonymous installation ID and starts with consent disabled. Pass installationId to retain an existing integration's identity. Await calls and handle PlatformException; flush again later after final delivery failures.

Shared methods

Use setConsent, track, flush, pendingEventCount, assignment, expose and configuration. Track accepts flowId, stepId, an AplynaAssignment and string-valued properties. Call expose only when the assigned UI appears. Configuration is code-first data: schemas 1/2 on iOS and schema 1 on Android.