summaryrefslogtreecommitdiffstats
path: root/lib/data/data_providers/audio_notifier.dart
blob: 89810365e1013df26d989c27765ffcdc77256a63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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);
  }
}