enter image description here
final textSpan = TextSpan(text: text, style: textStyle);
final textPainter =
TextPainter(text: textSpan, textDirection: TextDirection.ltr,maxLines: 1,textAlign: TextAlign.left);
textPainter.layout(minWidth: 0, maxWidth: double.infinity);
var computeLineMetrics = textPainter.computeLineMetrics();
for(var line in computeLineMetrics){
log("line $line");
}
text_style =TextStyle(inherit: true, color: Color(0xff000000), family: MoliFont, size: 378.0, height: 1.0x)
text = x
green box is the x size but I want to get the red box size
please help me ,thank you !
I want to get the red box size
New contributor
wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.