WIP #102 Moving all colors to theme

This commit is contained in:
Yegor Vialov
2020-04-06 21:39:16 +00:00
parent 524d195800
commit 007d12719c
10 changed files with 45 additions and 37 deletions

View File

@ -7,8 +7,7 @@ class BadgeWidget extends StatelessWidget {
double iconSize = 26.0;
Widget badgeIcon;
String onBadgeTextValue;
Color iconColor = HAClientTheme.badgeColors[entityModel.entityWrapper.entity.domain] ??
HAClientTheme.badgeColors["default"];
Color iconColor = HAClientTheme().getBadgeColor(entityModel.entityWrapper.entity.domain);
switch (entityModel.entityWrapper.entity.domain) {
case "sun":
{
@ -80,7 +79,7 @@ class BadgeWidget extends StatelessWidget {
padding: EdgeInsets.fromLTRB(6.0, 2.0, 6.0, 2.0),
child: Text("$onBadgeTextValue",
style: Theme.of(context).textTheme.overline.copyWith(
color: Colors.white
color: HAClientTheme().getOnBadgeTextColor()
),
textAlign: TextAlign.center,
softWrap: false,