diff options
Diffstat (limited to 'lib/data/data_providers/audio_notifier.dart')
-rw-r--r-- | lib/data/data_providers/audio_notifier.dart | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/data/data_providers/audio_notifier.dart b/lib/data/data_providers/audio_notifier.dart new file mode 100644 index 0000000..8981036 --- /dev/null +++ b/lib/data/data_providers/audio_notifier.dart @@ -0,0 +1,25 @@ +import 'package:flutter_ics_homescreen/export.dart'; + +class AudioNotifier extends StateNotifier<Audio> { + AudioNotifier(super.state); + + void resetToDefaults() { + state = state.copyWith(treble: 5.0, bass: 5.0, rearFront: 5.0); + } + + void setVolume(double newVal) { + state = state.copyWith(volume: newVal); + } + + void setTreble(double newVal) { + state = state.copyWith(treble: newVal); + } + + void setBass(double newVal) { + state = state.copyWith(bass: newVal); + } + + void setRearFront(double newVal) { + state = state.copyWith(rearFront: newVal); + } +} |