Resolves #120 Horizontal Stack Cards

This commit is contained in:
Yegor Vialov
2018-11-25 20:44:19 +02:00
parent 20b1b90e39
commit 9c403480e2
11 changed files with 187 additions and 139 deletions

View File

@ -14,24 +14,12 @@ class EntityButtonCardWidget extends StatelessWidget {
if (card.linkedEntityWrapper!= null && card.linkedEntityWrapper.entity.isHidden) {
return Container(width: 0.0, height: 0.0,);
}
if (card.name != null) {
card.linkedEntityWrapper.displayName = card.name;
}
card.linkedEntityWrapper.displayName = card.name?.toUpperCase() ?? card.linkedEntityWrapper.displayName.toUpperCase();
return Card(
child: Padding(
padding: EdgeInsets.fromLTRB(Sizes.leftWidgetPadding, Sizes.rowPadding, Sizes.rightWidgetPadding, Sizes.rowPadding),
child: EntityModel(
entityWrapper: card.linkedEntityWrapper,
child: GlanceEntityContainer(
showName: true,
showState: false,
nameInTheBottom: true,
iconSize: Sizes.largeIconSize,
nameFontSize: Sizes.nameFontSize,
expanded: true,
),
handleTap: true
),
child: EntityModel(
entityWrapper: card.linkedEntityWrapper,
child: ButtonEntityContainer(),
handleTap: true
)
);
}