@@ -1565,8 +1565,8 @@ enum TextDecorationStyle {
15651565 wavy
15661566}
15671567
1568- /// {@macro dart.ui.leadingDistribution }
1569- enum LeadingDistribution {
1568+ /// {@macro dart.ui.textLeadingDistribution }
1569+ enum TextLeadingDistribution {
15701570 /// Distributes the [leading] (https://en.wikipedia.org/wiki/Leading)
15711571 /// of the text proportionally above and below the text, to the font's
15721572 /// ascent/discent ratio.
@@ -1623,7 +1623,7 @@ class TextHeightBehavior {
16231623 const TextHeightBehavior ({
16241624 this .applyHeightToFirstAscent = true ,
16251625 this .applyHeightToLastDescent = true ,
1626- this .leadingDistribution = LeadingDistribution .proportional,
1626+ this .leadingDistribution = TextLeadingDistribution .proportional,
16271627 });
16281628
16291629 /// Creates a new TextHeightBehavior object from an encoded form.
@@ -1632,7 +1632,7 @@ class TextHeightBehavior {
16321632 TextHeightBehavior .fromEncoded (int encoded)
16331633 : applyHeightToFirstAscent = (encoded & 0x1 ) == 0 ,
16341634 applyHeightToLastDescent = (encoded & 0x2 ) == 0 ,
1635- leadingDistribution = LeadingDistribution .values[encoded >> 2 ];
1635+ leadingDistribution = TextLeadingDistribution .values[encoded >> 2 ];
16361636
16371637 /// Whether to apply the [TextStyle.height] modifier to the ascent of the first
16381638 /// line in the paragraph.
@@ -1658,17 +1658,17 @@ class TextHeightBehavior {
16581658 /// Defaults to true (height modifications applied as normal).
16591659 final bool applyHeightToLastDescent;
16601660
1661- /// {@template dart.ui.leadingDistribution }
1661+ /// {@template dart.ui.textLeadingDistribution }
16621662 /// How the ["leading"] (https://en.wikipedia.org/wiki/Leading) is distributed
16631663 /// over and under the text.
16641664 ///
16651665 /// Does not affect layout when [TextStyle.height] is not specified. The
1666- /// leading can become negative, for example, when [LeadingDistribution .even]
1666+ /// leading can become negative, for example, when [TextLeadingDistribution .even]
16671667 /// is used with a [TextStyle.height] much smaller than 1.0.
16681668 /// {@endtemplate}
16691669 ///
1670- /// Defaults to [LeadingDistribution .proportional] ,
1671- final LeadingDistribution leadingDistribution;
1670+ /// Defaults to [TextLeadingDistribution .proportional] ,
1671+ final TextLeadingDistribution leadingDistribution;
16721672
16731673 /// Returns an encoded int representation of this object.
16741674 int encode () {
@@ -1765,7 +1765,7 @@ Int32List _encodeTextStyle(
17651765 double ? letterSpacing,
17661766 double ? wordSpacing,
17671767 double ? height,
1768- LeadingDistribution ? leadingDistribution,
1768+ TextLeadingDistribution ? leadingDistribution,
17691769 Locale ? locale,
17701770 Paint ? background,
17711771 Paint ? foreground,
@@ -1903,7 +1903,7 @@ class TextStyle {
19031903 double ? letterSpacing,
19041904 double ? wordSpacing,
19051905 double ? height,
1906- LeadingDistribution ? leadingDistribution,
1906+ TextLeadingDistribution ? leadingDistribution,
19071907 Locale ? locale,
19081908 Paint ? background,
19091909 Paint ? foreground,
@@ -2006,7 +2006,7 @@ class TextStyle {
20062006 'letterSpacing: ${ _encoded [0 ] & 0x01000 == 0x01000 ? "${_letterSpacing }x" : "unspecified" }, '
20072007 'wordSpacing: ${ _encoded [0 ] & 0x02000 == 0x02000 ? "${_wordSpacing }x" : "unspecified" }, '
20082008 'height: ${ _encoded [0 ] & 0x04000 == 0x04000 ? "${_height }x" : "unspecified" }, '
2009- 'leadingDistribution: ${_encoded [0 ] & 0x0100 == 0x0100 ? "${LeadingDistribution .values [_encoded [8 ]]}" : "unspecified" }, '
2009+ 'leadingDistribution: ${_encoded [0 ] & 0x0100 == 0x0100 ? "${TextLeadingDistribution .values [_encoded [8 ]]}" : "unspecified" }, '
20102010 'locale: ${ _encoded [0 ] & 0x08000 == 0x08000 ? _locale : "unspecified" }, '
20112011 'background: ${ _encoded [0 ] & 0x10000 == 0x10000 ? _background : "unspecified" }, '
20122012 'foreground: ${ _encoded [0 ] & 0x20000 == 0x20000 ? _foreground : "unspecified" }, '
@@ -2259,7 +2259,7 @@ ByteData _encodeStrut(
22592259 List <String >? fontFamilyFallback,
22602260 double ? fontSize,
22612261 double ? height,
2262- LeadingDistribution ? leadingDistribution,
2262+ TextLeadingDistribution ? leadingDistribution,
22632263 double ? leading,
22642264 FontWeight ? fontWeight,
22652265 FontStyle ? fontStyle,
@@ -2350,10 +2350,12 @@ class StrutStyle {
23502350 /// be provided for this property to take effect.
23512351 ///
23522352 /// * `leading` : The minimum amount of leading between lines as a multiple of
2353- /// the font size. `fontSize` must be provided for this property to take effect.
2353+ /// the font size. `fontSize` must be provided for this property to take
2354+ /// effect. The leading added by this property is distributed evenly over
2355+ /// and under the text, regardless of `leadingDistribution` .
23542356 ///
2355- /// * `leadingDistribution` : Specifies how the extra vertical space added by
2356- /// the `height` multiplier should be distributed over and under the text,
2357+ /// * `leadingDistribution` : how the extra vertical space added by the
2358+ /// `height` multiplier should be distributed over and under the text,
23572359 /// independent of `leading` (which is always distributed evenly over and
23582360 /// under text).
23592361 ///
@@ -2375,7 +2377,7 @@ class StrutStyle {
23752377 List <String >? fontFamilyFallback,
23762378 double ? fontSize,
23772379 double ? height,
2378- LeadingDistribution ? leadingDistribution,
2380+ TextLeadingDistribution ? leadingDistribution,
23792381 double ? leading,
23802382 FontWeight ? fontWeight,
23812383 FontStyle ? fontStyle,
0 commit comments