【发布时间】:2021-10-11 20:24:52
【问题描述】:
我正在 Flutter 上开发一个应用程序,我的主页中有一个包含两个文本小部件的列。问题是在手机上,文字大小正常,但在平板电脑上,文字太小看不清。您能否建议一种根据屏幕尺寸动态放大文本的方法?
小部件:
Column(
children: [
Text(
widget.label,
style: TextStyle(
fontFamily: 'Roboto',
color: Colors.white,
fontWeight: FontWeight.bold),
),
Text(
widget.description,
style: TextStyle(
fontFamily: 'Roboto',
color: Colors.white,
fontWeight: FontWeight.w100),
)
],
),
谢谢
【问题讨论】:
标签: android flutter dart mobile