WIP Themes: Make all fonts depend on theme

This commit is contained in:
Yegor Vialov
2020-04-04 15:13:55 +00:00
parent f448a20784
commit a0a0cb4612
20 changed files with 88 additions and 105 deletions

View File

@ -28,7 +28,7 @@ class HistoryControlWidget extends StatelessWidget {
Expanded(
child: Padding(
padding: EdgeInsets.only(right: 10.0),
child: _buildStates(),
child: _buildStates(context),
),
),
_buildTime(),
@ -46,18 +46,16 @@ class HistoryControlWidget extends StatelessWidget {
}
}
Widget _buildStates() {
Widget _buildStates(BuildContext context) {
List<Widget> children = [];
for (int i = 0; i < selectedStates.length; i++) {
children.add(
Text(
"${selectedStates[i] ?? '-'}",
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
color: EntityColor.historyStateColor(selectedStates[i], colorIndexes[i]),
fontSize: 22.0
),
style: Theme.of(context).textTheme.title.copyWith(
color: EntityColor.historyStateColor(selectedStates[i], colorIndexes[i])
)
)
);
}