paintTextSize method
Implementation
Size paintTextSize(TextStyle style, {double maxWidth = double.infinity}) {
final textPainter =
TextPainter(text: TextSpan(text: this, style: style), maxLines: 1, textDirection: TextDirection.ltr)
..layout(minWidth: 0, maxWidth: maxWidth);
return textPainter.size;
}