computeMaxIntrinsicHeight method

  1. @override
double computeMaxIntrinsicHeight(
  1. double width
)
override

Computes the maximum height required to render the text within the given width.

Implementation

@override
double computeMaxIntrinsicHeight(double width) {
  _textPainter.text = TextSpan(
    style: normalStyle.style,
    children: _parseText,
  );
  _textPainter.layout(maxWidth: width);
  return _textPainter.height;
}