Resolves #530 Badges refactoring

This commit is contained in:
Yegor Vialov
2020-05-09 18:08:42 +00:00
parent e258b3bc2c
commit 1d1d132b33
7 changed files with 141 additions and 72 deletions

View File

@ -2,6 +2,7 @@ part of 'main.dart';
class HAView {
List<CardData> cards = [];
CardData badges;
Entity linkedEntity;
String name;
String id;
@ -16,10 +17,10 @@ class HAView {
isPanel = rawData['panel'] ?? false;
if (rawData['badges'] != null && !isPanel) {
cards.add(CardData.parse({
badges = CardData.parse({
'type': CardType.BADGES,
'badges': rawData['badges']
}));
});
}
(rawData['cards'] ?? []).forEach((rawCardData) {