optOut method

Future<void> optOut()

Disable all telemetry collection. Pending events are flushed first.

Implementation

Future<void> optOut() async {
  _config.enabled = false;
  await flush();
  _flushTimer?.cancel();
}