stopAll method

Future<void> stopAll()

Stop all audio and reset position.

Implementation

Future<void> stopAll() async {
  if (_currentPlayer != null) {
    try {
      await _currentPlayer!.stop();
    } catch (_) {
      // Player may already be disposed
    }
    _isPlaying = false;
    _playerChangedController.add(null);
  }
}