如何在Android studio上增加textView的字体?我可以设置字体样式,但是我找不到增加字体大小的属性
当您在XML中工作时,请尝试此android:textSize="xsp"
将'x'替换为您想要的'sp'缩放文本,如果您想要硬编码文本大小,请尝试'dp'
需要在TextStyle
中添加属性fontSize
的例子:
Text(
'Some text',
style: TextStyle(
fontSize: 20
)
)
文档:https://api.flutter.dev/flutter/painting/TextStyle-class.html