WIP Themes: font size standartization

This commit is contained in:
Yegor Vialov
2020-04-04 12:47:40 +00:00
parent b8ba3c59e9
commit 4432124e8c
16 changed files with 47 additions and 118 deletions

View File

@ -7,10 +7,9 @@ class SimpleEntityState extends StatelessWidget {
final EdgeInsetsGeometry padding;
final int maxLines;
final String customValue;
final double fontSize;
final bool bold;
//final bool bold;
const SimpleEntityState({Key key,this.bold: false, this.maxLines: 10, this.fontSize: Sizes.stateFontSize, this.expanded: true, this.textAlign: TextAlign.right, this.padding: const EdgeInsets.fromLTRB(0.0, 0.0, Sizes.rightWidgetPadding, 0.0), this.customValue}) : super(key: key);
const SimpleEntityState({Key key,/*this.bold: false,*/ this.maxLines: 10, this.expanded: true, this.textAlign: TextAlign.right, this.padding: const EdgeInsets.fromLTRB(0.0, 0.0, Sizes.rightWidgetPadding, 0.0), this.customValue}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -22,16 +21,17 @@ class SimpleEntityState extends StatelessWidget {
} else {
state = customValue;
}
TextStyle textStyle = TextStyle(
fontSize: this.fontSize,
fontWeight: FontWeight.normal
);
TextStyle textStyle;
if (entityModel.entityWrapper.entity.statelessType == StatelessEntityType.CALL_SERVICE) {
textStyle = textStyle.apply(color: Colors.blue);
textStyle = Theme.of(context).textTheme.subhead.copyWith(
color: Colors.blue
);
} else {
textStyle = Theme.of(context).textTheme.body1;
}
if (this.bold) {
/*if (this.bold) {
textStyle = textStyle.apply(fontWeightDelta: 100);
}
}*/
while (state.contains(" ")){
state = state.replaceAll(" ", " ");
}