togglePlayPause method

void togglePlayPause()

Implementation

void togglePlayPause() {
  if (isPlaying.value) {
    audioPlayer.pause();
  } else {
    audioPlayer.play();
  }
}