Resolves #204 Alarm panel card support

This commit is contained in:
estevez-dev
2019-01-29 15:00:15 +02:00
parent 24c7675fa4
commit 5e814e8109
8 changed files with 219 additions and 34 deletions

View File

@ -3,14 +3,18 @@ part of '../main.dart';
class CardHeaderWidget extends StatelessWidget {
final String name;
final Widget trailing;
final Widget subtitle;
const CardHeaderWidget({Key key, this.name}) : super(key: key);
const CardHeaderWidget({Key key, this.name, this.trailing, this.subtitle}) : super(key: key);
@override
Widget build(BuildContext context) {
var result;
if ((name != null) && (name.trim().length > 0)) {
result = new ListTile(
trailing: trailing,
subtitle: subtitle,
title: Text("$name",
textAlign: TextAlign.left,
overflow: TextOverflow.ellipsis,