🎧 Deep Dive · Intermediate

Harmony Music: offline-first player patterns

Offline music apps are storage, scanning, and service lifecycle problems. Harmony-style players keep a local library index and a playback service that survives UI navigation.

Diagram: Harmony Music

Patterns

  1. Scan once, listen to filesystem events later.
  2. Queue lives in a controller/service, not in a screen widget.
  3. Platform notification/media sessions are required UX.

Pitfalls

Large libraries need incremental indexing. Do not block first frame on a full SD card scan.

Compare with Spotube if you also need streaming catalogs.

#Flutter#OpenSource#Music