import 'package:audioplayers/audioplayers.dart'; import 'package:vibration/vibration.dart'; class GameSoundService { static final AudioPlayer _audioPlayer = AudioPlayer(); static Future playCardFlipSound() async { try { // For now, we'll use vibration as a placeholder for the flip sound if (await Vibration.hasVibrator()) { Vibration.vibrate(duration: 100); } } catch (e) { // Handle error } } static Future playSuccessSound() async { try { // Play success sound effect if (await Vibration.hasVibrator()) { Vibration.vibrate(pattern: [0, 200, 100, 200]); } } catch (e) { // Handle error } } static Future playHintFoundSound() async { try { // Play hint discovery sound if (await Vibration.hasVibrator()) { Vibration.vibrate(duration: 150); } } catch (e) { // Handle error } } static Future playPointsEarnedSound() async { try { // Play points earned sound with celebration vibration if (await Vibration.hasVibrator()) { Vibration.vibrate(pattern: [0, 100, 50, 100, 50, 200]); } } catch (e) { // Handle error } } static void dispose() { _audioPlayer.dispose(); } }