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 delivery metrics manually.
Push Messaging
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.
Zixflow.pushMessaging.onBackgroundMessageReceived(Map<String, dynamic> message): Future<bool>
Background helper around onMessageReceived (Android).
In-App Messaging
Zixflow.inAppMessaging.subscribeToEventsListener(void Function(InAppEvent) onEvent): StreamSubscription
Zixflow.inAppMessaging.dismissMessage(): void
Zixflow.inAppMessaging.inbox: NotificationInbox
Returns the notification inbox helper. See In-App Messaging for usage.
| Method | Description |
|---|---|
getMessages({String? topic}) | Fetch inbox messages |
messages({String? topic}) | Stream of inbox message changes |
markMessageOpened(message) | Mark as read |
markMessageUnopened(message) | Mark as unread |
markMessageDeleted(message) | Delete message |
trackMessageClicked(message, {String? actionName}) | Track a click |
InlineInAppMessageView
Flutter widget for inline in-app placements. Requires elementId. Available on Android and iOS.