flush static method

void flush()

Flush any queued telemetry events. Static method that delegates to instance if initialized. Matches Swift: CppBridge.Telemetry.flush()

Implementation

static void flush() {
  if (_isInitialized && _managerPtr != null) {
    try {
      final lib = PlatformLoader.loadCommons();
      final flushFn = lib.lookupFunction<Int32 Function(Pointer<Void>),
          int Function(Pointer<Void>)>('rac_telemetry_manager_flush');
      flushFn(_managerPtr!);
      _logger.debug('Telemetry flushed');
    } catch (e) {
      _logger.debug('flush error: $e');
    }
  }
}