How to Change Music
All background music and sound effects are handled by lib/core/services/sound_service.dart (SoundService), using the audioplayers package. Audio files live in assets/music/:
music.mp3— looping background music, played viaSoundService.playBackgroundMusic()/ stopped viastopBackgroundMusic().click.mp3— button tap sound effect.wingame.mp3— played on winning a match; background music auto-pauses and resumes around it.
To replace a sound
- Add your file under
assets/music/(already registered underflutter > assetsinpubspec.yaml). - Keep the same file name (
music.mp3,click.mp3, orwingame.mp3) so no code changes are needed, or update theAssetSource(...)path insound_service.dartif you rename it.
Mute / unmute
Players can toggle sound from Settings (lib/screens/settings/widgets/sound_toggle_card.dart), which calls SoundService.setEnabled(). The preference persists via LocalStorage.isSoundEnabled() / setSoundEnabled().