togglePlayPause method

Future<void> togglePlayPause()

Implementation

Future<void> togglePlayPause() async {
  if (_isPlaying) {
    await pause();
  } else {
    await play();
  }
}