在Flutter中控制文本小部件的字体大小

时间:2020-04-29 09:57:58

标签: flutter flutter-layout

将设备字体设置更改为最大后,小部件变得混乱。有什么技巧可以控制此行为,以便我可以更改设备字体设置,但小部件不会变得混乱?

1 个答案:

答案 0 :(得分:0)

您可以借助textScale factor调整小部件的大小。默认值为1.0。

Please input your age: 20

Traceback (most recent call last):
  File "/Users/RedHorseMain/Documents/myPythonScripts/A Beginners Guide to Python 3/6.10.3 getAge.py", line 20, in <module>
    age = int(age)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

在您的窗口小部件中使用它来调整您可能拥有的一些溢出窗口小部件。