flushEvents method
Manually triggers a flush of all queued events to the server.
The SDK automatically flushes events, but this can be used to ensure events are sent before app termination or in response to a network change.
Implementation
Future<void> flushEvents() async {
if (!_isInitialized) {
LinkFortyLogger.log('SDK not initialized. Call initialize() first.');
return;
}
await _eventTracker?.flushQueue();
}