pauseResume method
Implementation
Future<void> pauseResume(AudioPlayer player) async {
if (_state?.status == AudioStatus.playing) {
_state = _state?.copyWith(status: AudioStatus.paused);
await player.pause();
} else {
_state = _state?.copyWith(status: AudioStatus.playing);
await player.resume();
}
}