dispose method

Future<void> dispose()

Implementation

Future<void> dispose() async {
  _running = false;
  // Don't close the player on singleton — it will be reused.
  // Only stop the audio loop. Player stays open for next start().
  if (_player.isPlaying) {
    await _player.stopPlayer();
  }
}