TextHeightBehavior constructor

const TextHeightBehavior({bool applyHeightToFirstAscent: true bool applyHeightToLastDescent: true })

Creates a new TextHeightBehavior object.

  • applyHeightToFirstAscent: When true, the TextStyle.height modifier will be applied to the ascent of the first line. When false, the font's default ascent will be used.
  • applyHeightToLastDescent: When true, the TextStyle.height modifier will be applied to the descent of the last line. When false, the font's default descent will be used.

All properties default to true (height modifications applied as normal).

Implementation

const TextHeightBehavior({
  this.applyHeightToFirstAscent = true,
  this.applyHeightToLastDescent = true,
});