Mobile SDKv4.3.11MIT License
Flutter SDK
acai_flutter supports iOS, Android, macOS, and Web from a single Dart codebase. On mobile it auto-tracks sessions, app lifecycles, screen views, and deep links.
Installation
Add to pubspec.yaml:
Initialise
Track events
Identify users
Screen views
Config reference
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | String | required | Your project API key. |
serverUrl | String? | null | Custom collector endpoint. |
flushQueueSize | int | 30 | Events per batch before flush. |
flushIntervalMillis | int | 30000 | Flush interval in ms. |
flushMaxRetries | int | 5 | Max retry attempts. |
optOut | bool | false | Disable all tracking. |
logLevel | LogLevel | warn | off · error · warn · debug |
useBatch | bool | false | Use the /batch endpoint. |
defaultTracking | DefaultTrackingOptions | — | Auto-track sessions, appLifecycles, screenViews, deepLinks. |
enableCoppaControl | bool | false | COPPA compliance. |
flushEventsOnClose | bool | true | Flush on app backgrounded/closed. |
migrateLegacyData | bool | true | Migrate data from older SDK versions. |
minTimeBetweenSessionsMillis | int | 300000 | Session gap threshold (5 min mobile). |
