I am writing an application on Flutter. I want to dynamically change the font size in the text field (actually TextFormField) when the number of characters in it increases. What I want to achieve is that when a user enters a huge amount, I want to reduce the font size of the text field to accommodate the entire amount.
Asked
Active
Viewed 17 times
0
-
Check this answer, you can use device's default fontsize based on user device font. https://stackoverflow.com/a/76791484/12965265 – Ashikul Islam Sawan Aug 31 '23 at 15:27
1 Answers
1
There is a very useful library you might want to take a look at which is auto_size_text. It has some good controls for the dynamic text size change based on length and other attributes.

kovalyovi
- 1,006
- 1
- 9
- 19