textHeightBehavior property
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.
Implementation
TextHeightBehavior? get textHeightBehavior => _textPainter.textHeightBehavior;
Implementation
set textHeightBehavior(TextHeightBehavior? value) {
if (_textPainter.textHeightBehavior == value) {
return;
}
_textPainter.textHeightBehavior = value;
markNeedsLayout();
}