1

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?

enter image description here

MendelG
  • 14,885
  • 4
  • 25
  • 52
opvsvjoo
  • 47
  • 2
  • 5
  • refer [here](https://stackoverflow.com/questions/51674962/how-to-make-text-as-big-as-the-width-allows-in-flutter) – gretal Apr 08 '22 at 03:51

1 Answers1

1

i have some solution for you, hope it help.

  1. If you want fit a text string to container, you can use FittedBox and the text will auto scale to fit it container.

  2. If you want to scale widget by ratio, use Transform.scale.

  3. Change the font of text.

MendelG
  • 14,885
  • 4
  • 25
  • 52
Tuan
  • 2,033
  • 1
  • 9
  • 16
  • 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