mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-26 14:01:03 +02:00
19f69a6090
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.
16 lines
580 B
Dart
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';
|
|
}
|