fix(player): shuffle button state resets after closing page #1657

This commit is contained in:
Kingkor Roy Tirtho 2024-08-18 12:00:44 +06:00
parent 9a0421ce38
commit 411115327d

View File

@ -170,10 +170,9 @@ class PlayerControls extends HookConsumerWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
StreamBuilder<bool>( Consumer(builder: (context, ref, _) {
stream: audioPlayer.shuffledStream, final shuffled = ref
builder: (context, snapshot) { .watch(audioPlayerProvider.select((s) => s.shuffled));
final shuffled = snapshot.data ?? false;
return IconButton( return IconButton(
tooltip: shuffled tooltip: shuffled
? context.l10n.unshuffle_playlist ? context.l10n.unshuffle_playlist