If you want to use MediaQuery to set scaleFactor for text in Flutter? You can solve your issue wrapping your Text widget into a Flexible to avoid the overflow. I put maxLines 1 to see the Fade overflow:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
new Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Flexible( child: new Text( "Account Name: Let's Flutter all day long till down with fancy User Interface", maxLines: 1, style: new TextStyle( fontSize: myTextSize, color: Colors.black54), overflow: TextOverflow.fade, ), ), new Text( "109.65", style: new TextStyle( fontSize: myTextSize, fontWeight: FontWeight.bold, color: Colors.black), overflow: TextOverflow.fade, ), ], ), |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.