expands property

bool expands
final

Whether this widget's height will be sized to fill its parent.

If set to true and wrapped in a parent widget like Expanded or SizedBox, the input will expand to fill the parent.

maxLines and minLines must both be null when this is set to true, otherwise an error is thrown.

Defaults to false.

See the examples in maxLines for the complete picture of how maxLines, minLines, and expands interact to produce various behaviors.

Input that matches the height of its parent:

const Expanded(
  child: TextField(maxLines: null, expands: true),
)

Implementation

final bool expands;