final config = ZixflowConfig(
// Required
apiKey: 'YOUR_API_KEY',
// Logging level
logLevel: LogLevel.debug, // error, info, debug
// Auto-tracking options
autoTrackDeviceAttributes: true,
trackApplicationLifecycleEvents: true,
// Screen tracking
screenViewUse: ScreenView.all, // all, inApp, none
// Event batching
flushAt: 20, // Send events after 20 tracked
flushInterval: 30, // Or every 30 seconds
// Custom endpoints (advanced)
apiHost: 'custom-api.example.com',
cdnHost: 'custom-cdn.example.com',
// In-app messaging
inAppConfig: InAppConfig(),
// Push notifications
pushConfig: PushConfig(
// Push configuration options
),
// Location tracking
locationConfig: LocationConfig(),
);
await Zixflow.initialize(config: config);