Skip to content

Allow multiline TextField to expand vertically to fit container #21943

@lukepighetti

Description

@lukepighetti

This is the only way I have been able to achieve this and its pretty hacky. Would be nice if TextFields were able to expand vertically to fit the container.

Container(
  margin: EdgeInsets.all(8.0),
  // hack textfield height
  padding: EdgeInsets.only(bottom: 40.0),
  child: TextField(
    maxLines: 99,
    decoration: InputDecoration(
        hintText: "Comment!",
        border: OutlineInputBorder(),
    ),
  ),
),

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions