stop method
Stop playback
Implementation
Future<void> stop() async {
try {
await _audioPlayer.stop();
} catch (e) {
print('Error stopping audio: $e');
onError?.call('Failed to stop audio: $e');
}
}
Stop playback
Future<void> stop() async {
try {
await _audioPlayer.stop();
} catch (e) {
print('Error stopping audio: $e');
onError?.call('Failed to stop audio: $e');
}
}