fix: volume control not working

This commit is contained in:
Kingkor Roy Tirtho 2024-04-04 21:35:43 +06:00
parent 6d4f7e9a85
commit 83ac24ac02
2 changed files with 3 additions and 1 deletions

View File

@ -126,6 +126,7 @@ class BottomPlayer extends HookConsumerWidget {
Container(
height: 40,
constraints: const BoxConstraints(maxWidth: 250),
padding: const EdgeInsets.only(right: 10),
child: Consumer(builder: (context, ref, _) {
final volume = ref.watch(volumeProvider);
return VolumeSlider(
@ -138,7 +139,7 @@ class BottomPlayer extends HookConsumerWidget {
}),
)
],
)
),
],
),
),

View File

@ -274,6 +274,7 @@ class ConnectControlPage extends HookConsumerWidget {
value: volume,
onChanged: (value) {
ref.read(volumeProvider.notifier).state = value;
connectNotifier.setVolume(value);
},
);
}),