Skip to content

Commit 663acaa

Browse files
committed
Send message on enter
1 parent 5dc32f8 commit 663acaa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/chat.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,9 @@ class ChatScreenState extends State<ChatScreen> {
619619
Flexible(
620620
child: Container(
621621
child: TextField(
622+
onSubmitted: (value) {
623+
onSendMessage(textEditingController.text, 0);
624+
},
622625
style: TextStyle(color: primaryColor, fontSize: 15.0),
623626
controller: textEditingController,
624627
decoration: InputDecoration.collapsed(

0 commit comments

Comments
 (0)