startLoop method
Starts a sequential loop with the given id and body.
The body is executed repeatedly. The next iteration starts after the
previous one completes and delay has passed.
Implementation
void startLoop(
String id,
Future<void> Function() body, {
Duration? delay,
bool permanent = false,
}) {
final service = _LoopService(body, delay: delay);
registerService(id, service, permanent: permanent);
service.start();
}