textHeightBehavior property

TextHeightBehavior? get 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.

Implementation

TextHeightBehavior? get textHeightBehavior => _textHeightBehavior;
set textHeightBehavior (TextHeightBehavior? value)

Implementation

set textHeightBehavior(TextHeightBehavior? value) {
  if (_textHeightBehavior == value) {
    return;
  }
  _textHeightBehavior = value;
  markNeedsLayout();
}