Multi-line text box in awe

It may sound simple, but how can we make a multi-line editable text field in flutter? TextField works with only one line.

Edit: some accuracy, because it seems like this is not clear. Although you can set multiline to actually wrap text content, it is still not multiline. This is one line displayed in multiple lines. If you want to do something like that, you cannot. Because you do not have access to the button ENTER. And no enter button means no multiline.

+44
source share
6 answers

2017 enum .

new TextField(
  keyboardType: TextInputType.multiline,
  maxLines: whatever,
)
+49

, maxLines :

new TextField(
keyboardType: TextInputType.multiline,
maxLines: null,
)

maxLines null, , .

+53

TextField maxLines .

enter image description here

+1

TextFormField(
      keyboardType: TextInputType.multiline,
      maxLines: //Number_of_lines(int),)
+1

:: maxLines NULL, . , , .

: maxLines .

0

If the above didn’t work, try adding minLines as well

TextField(
        keyboardType: TextInputType.multiline,
        minLines: 3,
        maxLines: null);
0
source

All Articles