TextLeadingDistribution enum Null safety
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.
Constructors
- TextLeadingDistribution()
-
const
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
. WhenTextStyle.height
is not set, the text run uses the leading specified by the font instead.TextLeadingDistribution()
- 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
. WhenTextStyle.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".
TextLeadingDistribution()
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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.
[proportional, even]