expands property Null safety

bool expands

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:

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


bool get expands => _expands;
void expands=(bool value)


set expands(bool value) {
  assert(value != null);
  if (expands == value)
  _expands = value;