paintHeightWithTextStyle method

double paintHeightWithTextStyle(
  1. TextStyle style, {
  2. required double maxWidth,
})

Implementation

double paintHeightWithTextStyle(TextStyle style, {required double maxWidth}) {
  final TextPainter textPainter =
      TextPainter(text: TextSpan(text: this, style: style), textDirection: TextDirection.ltr)
        ..layout(minWidth: 0, maxWidth: maxWidth);
  return textPainter.size.height;
}