WIP Themes: badges colors

This commit is contained in:
Yegor Vialov
2020-04-04 15:44:06 +00:00
parent a0a0cb4612
commit eb4184713f

View File

@ -30,7 +30,7 @@ class BadgeWidget extends StatelessWidget {
badgeIcon = EntityIcon( badgeIcon = EntityIcon(
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
size: iconSize, size: iconSize,
color: Colors.black color: Theme.of(context).textTheme.body1.color
); );
break; break;
} }
@ -40,7 +40,7 @@ class BadgeWidget extends StatelessWidget {
badgeIcon = EntityIcon( badgeIcon = EntityIcon(
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
size: iconSize, size: iconSize,
color: Colors.black color: Theme.of(context).textTheme.body1.color
); );
onBadgeTextValue = entityModel.entityWrapper.entity.displayState; onBadgeTextValue = entityModel.entityWrapper.entity.displayState;
break; break;
@ -64,6 +64,9 @@ class BadgeWidget extends StatelessWidget {
overflow: TextOverflow.fade, overflow: TextOverflow.fade,
softWrap: false, softWrap: false,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: Theme.of(context).textTheme.body1.copyWith(
fontSize: stateFontSize
)
), ),
); );
break; break;
@ -99,7 +102,7 @@ class BadgeWidget extends StatelessWidget {
decoration: new BoxDecoration( decoration: new BoxDecoration(
// Circle shape // Circle shape
shape: BoxShape.circle, shape: BoxShape.circle,
color: Colors.white, color: Theme.of(context).cardColor,
// The border you want // The border you want
border: new Border.all( border: new Border.all(
width: 2.0, width: 2.0,