Files
SpotiFLAC-Mobile/lib/constants/music_services.dart
T
zarzet 19f69a6090 refactor: dispatch on MusicServices constants instead of raw service ids
Service ids ('deezer', 'tidal', 'qobuz', 'spotify', 'amazon', 'local')
were compared as raw string literals in every dispatch chain. Introduce
MusicServices constants and use them at the comparison/switch sites so
a typo becomes a compile error instead of a silently dead branch.
2026-07-10 10:17:59 +07:00

16 lines
580 B
Dart

/// Canonical service / provider identifiers shared across the app.
///
/// These values must stay in sync with the provider ids reported by the Go
/// backend and by extensions; use them instead of raw string literals when
/// comparing or dispatching on a service id.
abstract final class MusicServices {
static const spotify = 'spotify';
static const deezer = 'deezer';
static const tidal = 'tidal';
static const qobuz = 'qobuz';
static const amazon = 'amazon';
/// Pseudo-service for tracks that only exist in the local library.
static const local = 'local';
}