QueueNext/Prev in expanded controls
This commit is contained in:
parent
adfe7274fa
commit
a63e84d5b8
1 changed files with 12 additions and 2 deletions
|
|
@ -41,6 +41,16 @@ class _ExpandedControlsPlayerState extends State<ExpandedControlsPlayer> {
|
||||||
sessionManager.remoteMediaClient.showTracksChooserDialog();
|
sessionManager.remoteMediaClient.showTracksChooserDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _onSkipPrevClicked() {
|
||||||
|
final sessionManager = widget.castFramework.castContext.sessionManager;
|
||||||
|
sessionManager.remoteMediaClient.queuePrev();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onSkipNextClicked() {
|
||||||
|
final sessionManager = widget.castFramework.castContext.sessionManager;
|
||||||
|
sessionManager.remoteMediaClient.queueNext();
|
||||||
|
}
|
||||||
|
|
||||||
Widget _getIconButton(IconData icon, VoidCallback? onPressed) {
|
Widget _getIconButton(IconData icon, VoidCallback? onPressed) {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
|
|
@ -107,9 +117,9 @@ class _ExpandedControlsPlayerState extends State<ExpandedControlsPlayer> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
_getIconButton(Icons.closed_caption, _onClosedCaptionClicked),
|
_getIconButton(Icons.closed_caption, _onClosedCaptionClicked),
|
||||||
_getIconButton(Icons.skip_previous, null),
|
_getIconButton(Icons.skip_previous, _onSkipPrevClicked),
|
||||||
_getPlayPauseButton(playerState),
|
_getPlayPauseButton(playerState),
|
||||||
_getIconButton(Icons.skip_next, null),
|
_getIconButton(Icons.skip_next, _onSkipNextClicked),
|
||||||
_getVolumeButton(this.isMute),
|
_getVolumeButton(this.isMute),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue