stop method

Future<void> stop()

إيقاف التشغيل.

Implementation

Future<void> stop() async {
  _playerStateSubscription?.cancel();
  _playerStateSubscription = null;

  try {
    if (_player != null) {
      await _audioPlayer.stop();
    }
  } catch (_) {}

  isPlaying.value = false;
  isLoading.value = false;
  currentPlayingRef.value = null;
  isPlayingAyahWords.value = false;
}