startQueue method

void startQueue([
  1. Duration? interval
])

By starting the queue, all metrics are batched and sent every x interval. This would reduce the number of outbound requests. interval defaults to 10 seconds

Implementation

void startQueue([Duration? interval]) {
  interval ??= const Duration(seconds: 10);
  stopQueue();
  _timer = Timer.periodic(interval, _sendQueuedMetrics);
}