Fix font sizes, long entity states

This commit is contained in:
Yegor Vialov
2018-11-18 16:40:12 +02:00
parent af84c99a2d
commit efbe33f4e3
5 changed files with 17 additions and 8 deletions

View File

@ -17,7 +17,7 @@ class SimpleEntityState extends StatelessWidget {
child: Text(
"${entityModel.entityWrapper.entity.state}${entityModel.entityWrapper.entity.unitOfMeasurement}",
textAlign: textAlign,
maxLines: 4,
maxLines: 10,
overflow: TextOverflow.ellipsis,
softWrap: true,
style: new TextStyle(
@ -68,8 +68,9 @@ class SimpleEntityState extends StatelessWidget {
)
);
if (expanded) {
return SizedBox(
width: MediaQuery.of(context).size.width * 0.3,
return Flexible(
fit: FlexFit.tight,
flex: 2,
child: result,
);
} else {