TextHeightBehavior class - dart:ui library (original) (raw)

Defines how to apply TextStyle.height over and under text.

TextHeightBehavior.applyHeightToFirstAscent andTextHeightBehavior.applyHeightToLastDescent represent whether theTextStyle.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 andTextHeightBehavior.applyHeightToLastDescent.

Constructors

TextHeightBehavior({bool applyHeightToFirstAscent = true, bool applyHeightToLastDescent = true, TextLeadingDistribution leadingDistribution = TextLeadingDistribution.proportional})

Creates a new TextHeightBehavior object.

const

Properties

applyHeightToFirstAscentbool

Whether to apply the TextStyle.height modifier to the ascent of the first line in the paragraph.

final

applyHeightToLastDescentbool

Whether to apply the TextStyle.height modifier to the descent of the last line in the paragraph.

final

hashCodeint

The hash code for this object.

no setteroverride

leadingDistributionTextLeadingDistribution

How the "leading" is distributed over and under the text.

final

runtimeTypeType

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