Resolves #461 Hide media switch buttons if nothing playing
This commit is contained in:
parent
dff6457cb2
commit
b988fcfcdd
@ -403,25 +403,26 @@ class _MediaPlayerControlsState extends State<MediaPlayerControls> {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
children.add(
|
if (entity.state == EntityState.playing || entity.state == EntityState.paused) {
|
||||||
ButtonBar(
|
children.add(
|
||||||
children: <Widget>[
|
ButtonBar(
|
||||||
RaisedButton(
|
children: <Widget>[
|
||||||
child: Text("Duplicate to"),
|
RaisedButton(
|
||||||
color: Colors.blue,
|
child: Text("Duplicate to"),
|
||||||
textColor: Colors.white,
|
color: Colors.blue,
|
||||||
onPressed: () => _duplicateTo(entity),
|
textColor: Colors.white,
|
||||||
),
|
onPressed: () => _duplicateTo(entity),
|
||||||
RaisedButton(
|
),
|
||||||
child: Text("Switch to"),
|
RaisedButton(
|
||||||
color: Colors.blue,
|
child: Text("Switch to"),
|
||||||
textColor: Colors.white,
|
color: Colors.blue,
|
||||||
onPressed: () => _switchTo(entity),
|
textColor: Colors.white,
|
||||||
|
onPressed: () => _switchTo(entity),
|
||||||
|
)
|
||||||
|
],
|
||||||
)
|
)
|
||||||
],
|
);
|
||||||
)
|
}
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return Column(
|
return Column(
|
||||||
children: children,
|
children: children,
|
||||||
|
Reference in New Issue
Block a user