TextLeadingDistribution enum

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

Does not affect layout when TextStyle.height is not specified. The leading can become negative, for example, when TextLeadingDistribution.even is used with a TextStyle.height much smaller than 1.0.

Inheritance

Values

proportional → const TextLeadingDistribution

Distributes the leading of the text proportionally above and below the text, to the font's ascent/descent ratio.

The leading of a text run is defined as TextStyle.height * TextStyle.fontSize - TextStyle.fontSize. When TextStyle.height is not set, the text run uses the leading specified by the font instead.

even → const TextLeadingDistribution

Distributes the "leading" of the text evenly above and below the text (i.e. evenly above the font's ascender and below the descender).

The leading of a text run is defined as TextStyle.height * TextStyle.fontSize - TextStyle.fontSize. When TextStyle.height is not set, the text run uses the leading specified by the font instead.

The leading can become negative when TextStyle.height is smaller than 1.0.

This is the default strategy used by CSS, known as "half-leading".

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
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.
inherited

Operators

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

Constants

values → const List<TextLeadingDistribution>
A constant List of the values in this enum, in order of their declaration.