我有一个文本框,想要改变它的字体大小,因为我的应用程序将同时在iPad和移动电话上使用。文本框的字体大小适合移动电话,但对于iPad来说太小了。我该如何改变它呢?
Text(
'Bronze Master',
style: TextStyle(
fontSize: 8,
color: Colors.blue.shade700,
fontWeight: FontWeight.w600,
),
),
需要注意的是,此字体大小是相对大小,您在设备上看到的实际字体大小将基于设备的字体大小设置。这也是查找溢出问题的非常好的方法。
在TextField下使用样式
TextField(
style:TextStyle(fontSize:10),
//want to change the style for label and hint then
decoration:InputDecoration(
labelStyle:TextStyle(fontSize:10),
hintStyle: TextStyle(fontSize:10),
)
)