Skip to main content
Import the main package for core APIs, config, and enums:

Core SDK

Zixflow.initialize({required ZixflowConfig config}): Future<void>

Initialize the SDK with configuration. Call once before using other APIs.

Zixflow.instance

Singleton instance. Throws StateError if the SDK has not been initialized.

Zixflow.instance.identify({required String userId, Map<String, dynamic> traits}): void

Identify a user. Provide a unique userId and optional traits.

Zixflow.instance.clearIdentify(): void

Clear the current user’s identity.

Zixflow.instance.track({required String name, Map<String, dynamic> properties}): void

Track a custom event.

Zixflow.instance.screen({required String title, Map<String, dynamic> properties}): void

Track a screen view.

Zixflow.instance.setProfileAttributes({required Map<String, dynamic> attributes}): void

Set attributes on the user profile.

Zixflow.instance.setDeviceAttributes({required Map<String, dynamic> attributes}): void

Set attributes on the current device.

Zixflow.instance.registerDeviceToken({required String deviceToken}): void

Register a device token for push notifications.

Zixflow.instance.deleteDeviceToken(): void

Remove the current device token.

Zixflow.instance.trackMetric({required String deliveryID, required String deviceToken, required MetricEvent event}): void

Track push lifecycle metrics. With the Dart FCM + local-notifications integration, call this for opened (and optionally delivered). See Push Notification Tracking.
MetricEvent.converted is for conversion attribution after an open; it is not used by the standard push open/action flow. Action button presses use track(name: 'Push Notification Action Clicked', ...), not trackMetric.

Push Messaging

Native Android helpers for forwarding FCM data messages into the SDK (display and/or delivered tracking). The Dart path in sdk-examples/flutter uses trackMetric / track directly instead of these APIs.

Zixflow.pushMessaging.getRegisteredDeviceToken(): Future<String?>

Zixflow.pushMessaging.onMessageReceived(Map<String, dynamic> message, {bool handleNotificationTrigger = true}): Future<bool>

Process an FCM data message on Android (displays and/or tracks). On iOS this resolves to true without additional work. Use when another FCM listener receives the message and you want the native SDK to handle display/tracking.

Zixflow.pushMessaging.onBackgroundMessageReceived(Map<String, dynamic> message): Future<bool>

Background helper around onMessageReceived (Android).

Location

Zixflow.location.setLastKnownLocation({required double latitude, required double longitude}): void

Zixflow.location.requestLocationUpdate(): void

Types

ZixflowConfig

LogLevel

ScreenView

LocationTrackingMode

MetricEvent

PushClickBehaviorAndroid

PushConfig / PushConfigAndroid

LocationConfig