textHeightBehavior property

TextHeightBehavior? textHeightBehavior

Defines how to apply TextStyle.height over and under text.

TextHeightBehavior.applyHeightToFirstAscent and TextHeightBehavior.applyHeightToLastDescent represent whether the TextStyle.height modifier will be applied to the corresponding metric. By default both properties are true, and TextStyle.height is applied as normal. When set to false, the font's default ascent will be used.

TextHeightBehavior.leadingDistribution determines how the leading is distributed over and under text. This property applies before TextHeightBehavior.applyHeightToFirstAscent and TextHeightBehavior.applyHeightToLastDescent.


TextHeightBehavior? get textHeightBehavior => _textPainter.textHeightBehavior;
void textHeightBehavior=(TextHeightBehavior? value)


set textHeightBehavior(TextHeightBehavior? value) {
  if (_textPainter.textHeightBehavior == value) {
  _textPainter.textHeightBehavior = value;