textHeightBehavior property Null safety

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.

Implementation

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

Implementation

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