playLooped method

void playLooped({
  1. Duration delay = Duration.zero,
})

Starts sound looping.

delay is clamped positive

Implementation

void playLooped({Duration delay = Duration.zero}) {
  final delayMs = delay < Duration.zero ? 0 : delay.inMilliseconds;
  if (!_sound.looping.$1 || _sound.looping.$2 != delayMs) {
    _sound.looping = (true, delayMs);
  }

  _sound.play();
}