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

@ -154,6 +154,30 @@ class HAClientTheme {
}
}
TextStyle getLinkTextStyle(BuildContext context) {
ThemeData theme = Theme.of(context);
return theme.textTheme.body1.copyWith(
color: Colors.blue,
decoration: TextDecoration.underline
);
}
TextStyle getActionTextStyle(BuildContext context) {
ThemeData theme = Theme.of(context);
return theme.textTheme.subhead.copyWith(
color: Colors.blue
);
}
Color getBadgeColor(String entityDomain) {
return badgeColors[entityDomain] ??
badgeColors["default"];
}
Color getOnBadgeTextColor() {
return Colors.white;
}
charts.Color chartHistoryStateColor(String state, int id, BuildContext context) {
Color c = getColorByEntityState(state, context);
if (c != null) {