Sanket Jagtap.

Building BeatNest: A Cross-Platform Music App in Flutter

By ··2 min readflutterdartmobilemusicaudio-servicefirebasestate-management
Illustration for: Building BeatNest: A Cross-Platform Music App in Flutter

BeatNest is a cross-platform music streaming app built with Flutter. It streams tracks from the Saavn API and focuses on the things that actually make a music player feel good: gapless background playback, media-style notifications, lock-screen controls and offline listening.

Why Flutter

One codebase, two stores. Flutter let me ship a consistent UI on Android and iOS while still dropping down to native APIs where it mattered — the media session, notifications and storage permissions.

Architecture

The app follows a clean, service-oriented structure so the UI stays dumb and the logic stays testable:

Background playback

This is where most music apps fall apart. BeatNest combines just_audio for the player with audio_service for the OS-level media session. That gives you a notification with controls, lock-screen artwork, and playback that keeps going when the app is swiped away.

dependencies:
  just_audio: ^0.10.5
  audio_service: ^0.18.12
  audio_session: ^0.2.3
  rxdart: ^0.28.0

Auth and cloud sync

Users can continue as a guest or sign in with email or Google via Firebase Auth. Signing in syncs their liked songs and playlists across devices through Cloud Firestore, so the library follows the user, not the phone.

Offline and resilience

Downloads use dio with a local SQLite index so songs are available without a connection, and connectivity_plus gracefully degrades the UI when the network drops. Crashes and usage are tracked with Firebase Crashlytics and Analytics.

Lessons learned

BeatNest started as an experiment in "can Flutter really do a proper media app?" The answer turned out to be a confident yes.

Keep reading