startSweeping static method

void startSweeping({
  1. Duration every = const Duration(seconds: 15),
})

Sweeps on an interval. Call once at boot on a long-lived process.

Implementation

static void startSweeping({Duration every = const Duration(seconds: 15)}) {
  _sweeper?.cancel();
  _sweeper = Timer.periodic(every, (_) => unawaited(sweep()));
}