Massive refactoring: UIBuilder, Vew, HACArd, Badge

This commit is contained in:
estevez
2018-09-28 10:15:25 +03:00
parent 375ae36884
commit 098a556279
7 changed files with 170 additions and 97 deletions

25
lib/card_class.dart Normal file
View File

@ -0,0 +1,25 @@
part of 'main.dart';
class HACard {
String _entityId;
List _entities;
String _friendlyName;
List get entities => _entities;
String get friendlyName => _friendlyName;
HACard(String groupId, String friendlyName) {
_entityId = groupId;
_entities = [];
_friendlyName = friendlyName;
}
void addEntity(String entityId) {
_entities.add(entityId);
}
void addEntities(List entities) {
_entities.addAll(entities);
}
}