TextHeightBehavior简介
定义如何在文本上方和下方应用 TextStyle.height。 TextHeightBehavior.applyHeightToFirstAscent 和 TextHeightBehavior.applyHeightToLastDescent 表示是否将 TextStyle.height 修饰符应用于相应的指标。 默认情况下,这两个属性都为真,并且 TextStyle.height 正常应用。 当设置为 false 时,将使用字体的默认上升。 TextHeightBehavior.leadingDistribution 确定行距在文本上方和下方的分布方式。 此属性在 TextHeightBehavior.applyHeightToFirstAscent 和 TextHeightBehavior.applyHeightToLastDescent 之前应用
属性介绍
属性 | 参数类型 | 介绍 |
---|---|---|
applyHeightToFirstAscent | bool | 是否应用TextStyle。将高度修改符设置为段落中第一行的上升 |
applyHeightToLastDescent | bool | 是否应用TextStyle。将高度修改符设置为段落中最后一行的下降 |
l |