mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
feat(PlayerView): shortcut button for opening lyrics #273
This commit is contained in:
parent
6b6907af3f
commit
1d4847ab0a
@ -14,9 +14,11 @@ import 'package:spotube/utils/type_conversion_utils.dart';
|
|||||||
class PlayerActions extends HookConsumerWidget {
|
class PlayerActions extends HookConsumerWidget {
|
||||||
final MainAxisAlignment mainAxisAlignment;
|
final MainAxisAlignment mainAxisAlignment;
|
||||||
final bool floatingQueue;
|
final bool floatingQueue;
|
||||||
|
final List<Widget>? extraActions;
|
||||||
PlayerActions({
|
PlayerActions({
|
||||||
this.mainAxisAlignment = MainAxisAlignment.center,
|
this.mainAxisAlignment = MainAxisAlignment.center,
|
||||||
this.floatingQueue = true,
|
this.floatingQueue = true,
|
||||||
|
this.extraActions,
|
||||||
Key? key,
|
Key? key,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
final logger = getLogger(PlayerActions);
|
final logger = getLogger(PlayerActions);
|
||||||
@ -90,6 +92,7 @@ class PlayerActions extends HookConsumerWidget {
|
|||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
if (playback.track != null) TrackHeartButton(track: playback.track!),
|
if (playback.track != null) TrackHeartButton(track: playback.track!),
|
||||||
|
...(extraActions ?? [])
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -161,6 +161,16 @@ class PlayerView extends HookConsumerWidget {
|
|||||||
PlayerActions(
|
PlayerActions(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
floatingQueue: false,
|
floatingQueue: false,
|
||||||
|
extraActions: [
|
||||||
|
IconButton(
|
||||||
|
tooltip: "Open Lyrics",
|
||||||
|
icon: const Icon(Icons.lyrics_rounded),
|
||||||
|
onPressed: () {
|
||||||
|
GoRouter.of(context).pop();
|
||||||
|
GoRouter.of(context).go('/lyrics');
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
PlayerControls(iconColor: paletteColor.bodyTextColor),
|
PlayerControls(iconColor: paletteColor.bodyTextColor),
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user