TextHeightBehavior class

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.

Constructors

TextHeightBehavior({bool applyHeightToFirstAscent = true, bool applyHeightToLastDescent = true, TextLeadingDistribution leadingDistribution = TextLeadingDistribution.proportional})
Creates a new TextHeightBehavior object.
const

Properties

applyHeightToFirstAscent bool
Whether to apply the TextStyle.height modifier to the ascent of the first line in the paragraph.
final
applyHeightToLastDescent bool
Whether to apply the TextStyle.height modifier to the descent of the last line in the paragraph.
final
hashCode int
The hash code for this object.
no setteroverride
leadingDistribution TextLeadingDistribution
How the "leading" is distributed over and under the text.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override