Is there a way to dynamically change the Flutter TextField's maxLines?
Flutter was lagging multiline support in TextField. After an issue was raised regarding the same, the multiline feature has been added in the 0.0.16 release.
Make sure you upgrade flutter to the latest release. To get multiline TextField use:
new TextField(
maxLines: null,
keyboardType: TextInputType.multiline,
)
Hope this helped!
its look like a text-area. you can try with maxLines
maxLines: 8
TextField(
maxLines: 8,
decoration: InputDecoration(hintText: "Enter your text here", border: OutlineInputBorder(),
labelText: 'Post Body'),
),