part of '../main.dart'; class HACard { List entities = []; List childCards = []; EntityWrapper linkedEntityWrapper; String name; String id; String type; bool showName; bool showState; bool showEmpty; int columnsCount; List stateFilter; List states; List conditions; String content; HACard({ this.name, this.id, this.linkedEntityWrapper, this.columnsCount: 4, this.showName: true, this.showState: true, this.stateFilter: const [], this.showEmpty: true, this.content, this.states, this.conditions: const [], @required this.type }); List getEntitiesToShow() { return entities.where((entityWrapper) { if (entityWrapper.entity.isHidden) { return false; } if (stateFilter.isNotEmpty) { return stateFilter.contains(entityWrapper.entity.state); } return true; }).toList(); } Widget build(BuildContext context) { return CardWidget( card: this, ); } }