Research consistently shows that ambient sound — particularly nature sounds and instrumental music — lowers cortisol levels, reduces perceived stress, and improves focus. ErgoKawsay’s Music module brings this benefit directly to teachers without requiring headphones, playlists, subscriptions, or even an internet connection. Three carefully selected ambient tracks are bundled as app assets and ready to play the moment the module is opened. The music player is designed to be non-intrusive: a mini player persists at the bottom of the screen across other modules so teachers can keep ambient audio running while reading tips, reviewing exercises, or logging their emotions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Cristiang1021/ErgoKawsay/llms.txt
Use this file to discover all available pages before exploring further.
Available Tracks
Forest Sounds
Sonido del bosqueThe natural soundscape of a forest — birdsong, wind through leaves, rustling branches. Ideal for restoring attention and reducing cognitive fatigue between classes.Asset:
assets/audio/Sonido-del-bosque.mp3Track ID: forestGentle Rain
Lluvia SuaveSoft, consistent rainfall — one of the most universally recognized sounds for relaxation. Effective for winding down after a demanding teaching session or preparing for sleep.Asset:
assets/audio/Lluvia-Suave.mp3Track ID: rainEnergizing Music
Música energizanteUpbeat instrumental music to restore energy and motivation. Suitable for preparation periods, active breaks, or the start of the school day.Asset:
assets/audio/Musica-energizante.mp3Track ID: energizingAll three audio tracks are bundled directly inside the app as Flutter asset files. No streaming, no network request, and no internet connection is required to play them. Audio is available even in areas with no connectivity.
Audio Features
- Play / Pause — tap the track card or the featured card’s CTA button to start playback; tap again to pause.
- Track switching — tapping any track in the ambient list immediately loads and plays that track, even while another is playing.
- Progress bar — an inline
LinearProgressIndicatorshows current playback position on both the featured card and the active list card. Elapsed and total duration are displayed. - Audio visualizer animation — when a track is active and playing, a green animated indicator dot pulses on its list card.
- Mini player (persistent) — a compact now-playing bar appears at the bottom of the main app scaffold while audio is active, allowing playback control without staying on the Music screen. The Music screen sets
hideMiniPlayer: trueto avoid duplication. - Auto-advance — when a track finishes, playback automatically advances to the next track in the playlist order.
- Previous / Next —
AudioControllerexposesprevious()andnext()methods for sequential navigation through the playlist.
Visual Theme
Each track has a distinct color scheme derived from the app palette:| Track | Background | Foreground text |
|---|---|---|
| Forest | blockLime | blockLimeText |
| Rain | blockLilac | blockLilacText |
| Energizing | blockMint | blockMintText |
forest) uses the blockMint color scheme with a large circular icon and an active progress bar.
Implementation
Package:just_audio ^0.9.40
Audio is managed by a global singleton AudioController that persists for the entire app lifetime. It extends ChangeNotifier so that any ListenableBuilder subscribed to it rebuilds in response to playback state changes.
pubspec.yaml:
isAsset is true on a MusicTrack, AudioController loads via _player.setAsset(track.assetPath). When isAsset is false and a url is provided, it loads via _player.setUrl(track.url!). Only asset-based playback is used in the current release.
MusicTrack Model
Tracks are immutable value objects defined inlib/data/models/music_track.dart.
Technical Reference
| Property | Value |
|---|---|
| Route | /music |
| Category eyebrow | Relajación / (Kichwa equivalent) |
| State management | ListenableBuilder on AudioController.instance |
| Audio package | just_audio ^0.9.40 |
| Data source | LocalDataRepository.instance.musicTracks |
| Total tracks | 3 |
| Streaming | ❌ None — all assets bundled in APK |
| Network required | ❌ Fully offline |