Skip to content

Commit 8081d00

Browse files
committed
Adjust min, max and division values to align them with the sound protocol specification from Minecraft
1 parent 073ee53 commit 8081d00

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

lib/feature/sound/modal/section/sound_slider.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ class SoundSliderRow extends StatelessWidget {
1818
this.onChangeEnd,
1919
this.min = 0.0,
2020
this.max = 1.0,
21-
this.divisions,
22-
this.labelWidth = 100.0, // Default label width
21+
this.divisions = 10,
22+
this.labelWidth = 100.0,
2323
this.labelStyle,
2424
this.valueDecimalPlaces = 2,
25-
super.key, // For the Slider's own label
25+
super.key,
2626
});
2727

2828
final String label;

lib/feature/sound/modal/section/volume_section.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ class _VolumeSectionState extends State<VolumeSection> {
5151
SoundSliderRow(
5252
label: 'Volume',
5353
value: _currentVolume,
54-
min: 0,
55-
max: 2,
56-
// As per your original _sliderRow call
57-
divisions: 100,
58-
// As per your original _sliderRow call
5954
onChanged: (newVolume) {
6055
setState(() {
6156
_currentVolume = newVolume;
@@ -68,11 +63,6 @@ class _VolumeSectionState extends State<VolumeSection> {
6863
SoundSliderRow(
6964
label: 'Pitch',
7065
value: _currentPitch,
71-
min: 0,
72-
max: 2,
73-
// As per your original _sliderRow call
74-
divisions: 100,
75-
// As per your original _sliderRow call
7666
onChanged: (newPitch) {
7767
setState(() {
7868
_currentPitch = newPitch;

0 commit comments

Comments
 (0)