diff --git a/lib/entities/media_player/widgets/media_player_widgets.dart b/lib/entities/media_player/widgets/media_player_widgets.dart index 529a61f..988093e 100644 --- a/lib/entities/media_player/widgets/media_player_widgets.dart +++ b/lib/entities/media_player/widgets/media_player_widgets.dart @@ -403,25 +403,26 @@ class _MediaPlayerControlsState extends State { ) ); } - children.add( - ButtonBar( - children: [ - RaisedButton( - child: Text("Duplicate to"), - color: Colors.blue, - textColor: Colors.white, - onPressed: () => _duplicateTo(entity), - ), - RaisedButton( - child: Text("Switch to"), - color: Colors.blue, - textColor: Colors.white, - onPressed: () => _switchTo(entity), + if (entity.state == EntityState.playing || entity.state == EntityState.paused) { + children.add( + ButtonBar( + children: [ + RaisedButton( + child: Text("Duplicate to"), + color: Colors.blue, + textColor: Colors.white, + onPressed: () => _duplicateTo(entity), + ), + RaisedButton( + child: Text("Switch to"), + color: Colors.blue, + textColor: Colors.white, + onPressed: () => _switchTo(entity), + ) + ], ) - ], - ) - ); - + ); + } } return Column( children: children,