Skip to content

Commit

Permalink
feat: add shuffle button in appbar actions temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
Yesterday17 committed Sep 19, 2024
1 parent 15df134 commit d9b83b8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 93 deletions.
20 changes: 20 additions & 0 deletions lib/ui/page/home/home.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:annix/providers.dart';
import 'package:annix/ui/dialogs/loading.dart';
import 'package:annix/ui/page/favorite.dart';
import 'package:annix/ui/page/home/home_playlist.dart';
import 'package:annix/ui/page/playback_history.dart';
Expand Down Expand Up @@ -37,6 +38,25 @@ class HomePage extends HookWidget {
floating: true,
title: const Text('Annix'),
actions: [
Consumer(
child: const Icon(Icons.shuffle),
builder: (context, ref, child) {
return IconButton(
icon: child!,
onPressed: () {
showLoadingDialog(context);
ref.read(playbackProvider).fullShuffleMode().then(
(final value) {
if (context.mounted) {
Navigator.of(context, rootNavigator: true)
.pop();
}
},
);
},
);
},
),
const ThemeButton(),
IconButton(
icon: const Icon(Icons.settings_outlined),
Expand Down
93 changes: 0 additions & 93 deletions lib/ui/page/home/home_action_grid.dart

This file was deleted.

0 comments on commit d9b83b8

Please sign in to comment.