Reverting views refactoring

This commit is contained in:
Yegor Vialov
2018-10-21 02:39:51 +03:00
parent 33f9a1075e
commit 9b490d33d5
5 changed files with 123 additions and 55 deletions

View File

@ -4,13 +4,11 @@ class HACard extends StatelessWidget {
final List<Entity> entities;
final String friendlyName;
final bool hidden;
const HACard({
Key key,
this.entities,
this.friendlyName,
this.hidden
this.friendlyName
}) : super(key: key);
@override
@ -18,13 +16,9 @@ class HACard extends StatelessWidget {
List<Widget> body = [];
body.add(_buildCardHeader());
body.addAll(_buildCardBody(context));
if (hidden) {
return Container(height: 0.0,);
} else {
return Card(
child: new Column(mainAxisSize: MainAxisSize.min, children: body)
);
}
return Card(
child: new Column(mainAxisSize: MainAxisSize.min, children: body)
);
}
Widget _buildCardHeader() {