I have a text field with a limited width. I want it to automatically move to the next line when one line is filled. After that, I want to count the number of lines. I am currently using the following method:
String textLine =
homeController
.textFieldController
.text
.split('n')[index];
However, I must press "Enter" for a new line to be recognized; otherwise, it goes to the next line but does not count it.
Something like this :
2
Answers
use :
Set Max Line based on your screen
I think auto_size_text is what you are looking for.