Allow multiple lines when typing a message

parent 66dbdc27
......@@ -161,7 +161,14 @@ class ChatPageState extends State<ChatPage> {
Expanded(
child: _buildEventsList(),
),
_buildInput(),
ConstrainedBox(
constraints: BoxConstraints.loose(
Size.fromHeight(
MediaQuery.of(context).size.height / 3,
),
),
child: _buildInput(),
),
],
);
}
......@@ -188,6 +195,8 @@ class ChatPageState extends State<ChatPage> {
color: themed(context, light: Colors.white, dark: Colors.grey[800]),
child: TextField(
controller: textController,
keyboardType: TextInputType.multiline,
maxLines: null,
textInputAction: TextInputAction.newline,
autocorrect: true,
textCapitalization: TextCapitalization.sentences,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment