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

View File

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