Resolves #151 Group visibility support

This commit is contained in:
Yegor Vialov
2018-10-21 16:11:47 +03:00
parent 6a43e04b31
commit 0f6babc243
3 changed files with 25 additions and 7 deletions

View File

@ -1,11 +1,11 @@
part of 'main.dart';
class HACard extends StatelessWidget {
class CardWidget extends StatelessWidget {
final List<Entity> entities;
final String friendlyName;
const HACard({
const CardWidget({
Key key,
this.entities,
this.friendlyName
@ -13,6 +13,13 @@ class HACard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final entityModel = EntityModel.of(context);
if (entityModel != null) {
final groupEntity = entityModel.entity;
if (groupEntity.isHidden) {
return Container(width: 0.0, height: 0.0,);
}
}
List<Widget> body = [];
body.add(_buildCardHeader());
body.addAll(_buildCardBody(context));