Move history widget under additional controls
This commit is contained in:
@ -125,8 +125,9 @@ class Entity {
|
|||||||
DefaultEntityContainer(state: _buildStatePartForPage(context)),
|
DefaultEntityContainer(state: _buildStatePartForPage(context)),
|
||||||
LastUpdatedWidget(),
|
LastUpdatedWidget(),
|
||||||
Divider(),
|
Divider(),
|
||||||
buildHistoryWidget(),
|
|
||||||
_buildAdditionalControlsForPage(context),
|
_buildAdditionalControlsForPage(context),
|
||||||
|
Divider(),
|
||||||
|
buildHistoryWidget(),
|
||||||
EntityAttributesList()
|
EntityAttributesList()
|
||||||
]),
|
]),
|
||||||
handleTap: false,
|
handleTap: false,
|
||||||
|
@ -26,7 +26,7 @@ class MediaControlCardWidget extends StatelessWidget {
|
|||||||
right: 0.0,
|
right: 0.0,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 80.0,
|
height: 80.0,
|
||||||
color: Colors.black26,
|
color: Colors.black45,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@ -54,7 +54,8 @@ class MediaControlCardWidget extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
List<Widget> states = [];
|
List<Widget> states = [];
|
||||||
states.add(Text("${card.linkedEntity.displayName}", style: style));
|
states.add(Text("${card.linkedEntity.displayName}", style: style));
|
||||||
if (card.linkedEntity.state == null || card.linkedEntity.state == "off" || card.linkedEntity.state == "unavailable") {
|
String state = card.linkedEntity.state;
|
||||||
|
if (state == null || state == "off" || state == "unavailable" || state == "idle") {
|
||||||
states.add(Text("${card.linkedEntity.state}", style: style.apply(fontSizeDelta: 4.0),));
|
states.add(Text("${card.linkedEntity.state}", style: style.apply(fontSizeDelta: 4.0),));
|
||||||
} else {
|
} else {
|
||||||
states.add(Text("${card.linkedEntity.attributes['media_title'] ?? '-'}", style: style.apply(fontSizeDelta: 6.0, fontWeightDelta: 50),));
|
states.add(Text("${card.linkedEntity.attributes['media_title'] ?? '-'}", style: style.apply(fontSizeDelta: 6.0, fontWeightDelta: 50),));
|
||||||
@ -70,7 +71,8 @@ class MediaControlCardWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildImage() {
|
Widget _buildImage() {
|
||||||
if (homeAssistantWebHost != null && card.linkedEntity.entityPicture != null) {
|
String state = card.linkedEntity.state;
|
||||||
|
if (homeAssistantWebHost != null && card.linkedEntity.entityPicture != null && state != "off" && state != "unavailable" && state != "idle") {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
Reference in New Issue
Block a user