I try to build a Chat-App where the "New Message"-Screen contains of the receipient and the message. I want that the TextField fills up the remaining space on the screen. Like a Textarea in HTML.
- I have tried to increase the
maxLines
to a big number which caused an Pixel overflow error with the Floating Action Button. - I tried wrapping it in a
Expanded
Widget which had no effect on it.
This is my current Structure of the Layout:
body: new Column(
children: <Widget>[
new ListTile(
dense: false,
title: new Text("Alex XYZ",
//...
),
Divider(),
new TextField(
decoration: InputDecoration(hintText: "Insert your message",),
scrollPadding: EdgeInsets.all(20.0),
autofocus: true,
)
],
),
With the TextField in the Code above I can not even write multiple lines. If I add maxLines: 2 I can press enter to move down, but this does not look clean and you can not scroll in that area.
I hope somebody can help me on how to expand that to the whole screen.
Best Regards Alex!