computeMinIntrinsicHeight method

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

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

Implementation

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