restart method

Future<void> restart()

Restart current loaded audio Useful for effect like click sound that have to be played multiple time

Implementation

Future<void> restart() async {
  await stop();
  await _player.seek(Duration.zero);
  await play();
}