flutter multi line text field code example

Example 1: how to enable multiline text form fields flutter

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

Example 2: how to flutter multiple line text

Container(
  width: 150,
  child: Text(
    "This text is very very very very very very very very very very very very very very very very very very very very very very very very very long",
    overflow: TextOverflow.ellipsis,
    maxLines: 5,
  ),
),

Example 3: flutter multiline text field

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

Tags:

Misc Example