togglePlayPause method
Toggle between play and pause
Implementation
Future<void> togglePlayPause() async {
if (isPlaying) {
await pause();
} else {
await play();
}
}
Toggle between play and pause
Future<void> togglePlayPause() async {
if (isPlaying) {
await pause();
} else {
await play();
}
}