I want to know how to adjust the width of a letter. When using Kotlin, it can be adjusted with scalex. But how do I do it in Flutter?
Asked
Active
Viewed 71 times
1 Answers
1
i have some solution for you, hope it help.
If you want fit a text string to container, you can use
FittedBox
and the text will auto scale to fit it container.If you want to scale widget by ratio, use
Transform.scale
.Change the font of text.
-
Thank you for answer. Currently, in my case, the second answer seems to be the most appropriate. However, the size of the inner Text widget has been reduced, but the size of the Transform.scale widget remains the same. Can't Transform.scale widgets be reduced together with Text widget? – opvsvjoo Apr 08 '22 at 03:56
-
You can try use both. I have never tried changing the width of the text before – Tuan Apr 08 '22 at 04:00