Arc*_*nes 26 material-design flutter
所以在 Onboarding 下的 Material Design Spec 中:这里
明确规定:
32sp 线高
这是从标题文本底部到副标题文本基线的高度。
我的问题是如何在颤振中实现这一点。填充足以模仿这个规范吗?或者有其他更准确的方法来做到这一点?
Ayu*_*ani 45
是的,还有一个height属性TextStyle允许您手动调整线的高度。
代码片段
Text('Hey There',
style: TextStyle(height: 5, fontSize: 10),
)
Run Code Online (Sandbox Code Playgroud)
awa*_*aik 27
除了Ayush的回答。如果我们查看文档,我们可以看到
When height is non-null, the line height of the span of text will be a multiple of fontSize and be exactly fontSize * height logical pixels tall.
例如,如果想要高度为 24.0,字体大小为 20.0,我们应该有高度属性 1,2。
例子:
TextStyle(
fontSize: 20.0,
height: 1.2,
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
29527 次 |
| 最近记录: |