Resolves #461 Hide media switch buttons if nothing playing

This commit is contained in:
estevez-dev 2019-09-20 16:42:50 +03:00
parent dff6457cb2
commit b988fcfcdd

View File

@ -403,6 +403,7 @@ class _MediaPlayerControlsState extends State<MediaPlayerControls> {
) )
); );
} }
if (entity.state == EntityState.playing || entity.state == EntityState.paused) {
children.add( children.add(
ButtonBar( ButtonBar(
children: <Widget>[ children: <Widget>[
@ -421,7 +422,7 @@ class _MediaPlayerControlsState extends State<MediaPlayerControls> {
], ],
) )
); );
}
} }
return Column( return Column(
children: children, children: children,