pause method
Pauses the background music without unloading or resetting the audio player.
Implementation
Future<void> pause() async {
if (audioPlayer != null) {
isPlaying = false;
await audioPlayer!.pause();
}
}
Pauses the background music without unloading or resetting the audio player.
Future<void> pause() async {
if (audioPlayer != null) {
isPlaying = false;
await audioPlayer!.pause();
}
}