mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-21 06:52:18 +02:00
22 lines
703 B
Dart
22 lines
703 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:spotiflac_android/models/equalizer_settings.dart';
|
|
|
|
/// Shared by every playback deck, including AutoMix's incoming/outgoing decks.
|
|
final playbackEqualizer = ValueNotifier<EqualizerSettings>(
|
|
const EqualizerSettings(),
|
|
);
|
|
|
|
/// A native error is surfaced in the editor rather than claiming EQ is active.
|
|
final playbackEqualizerError = ValueNotifier<String?>(null);
|
|
|
|
final _errors = <String, String>{};
|
|
|
|
void reportEqualizerError(String playerId, String? error) {
|
|
if (error == null) {
|
|
_errors.remove(playerId);
|
|
} else {
|
|
_errors[playerId] = error;
|
|
}
|
|
playbackEqualizerError.value = _errors.isEmpty ? null : _errors.values.first;
|
|
}
|