This repository has been archived on 2023-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
ha_client/lib/cards/vertical_stack_card.dart

23 lines
553 B
Dart
Raw Normal View History

2020-04-25 20:38:21 +03:00
part of '../main.dart';
class VerticalStackCard extends StatelessWidget {
final HACard card;
const VerticalStackCard({Key key, this.card}) : super(key: key);
@override
Widget build(BuildContext context) {
if (card.childCards.isNotEmpty) {
return Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: card.childCards.map(
(childCard) => LovelaceCard(card: childCard)
).toList(),
);
}
return Container(height: 0.0, width: 0.0,);
}
}