I am using Stream chat API for the chat application. And while sending message I want to use the newline character in the textinput but I tried, the following code. It isn't working. And I am not finding any fixes, on the internet. Any help would be grateful appreciated.
child: TextField(
textInputAction: TextInputAction.newline,
keyboardType: TextInputType.multiline,
controller: controller,
onChanged: (val) {
StreamChannel.of(context).channel.keyStroke();
},
style: const TextStyle(fontSize: 14),
decoration: const InputDecoration(
hintText: 'Type something...',
border: InputBorder.none,
),
onSubmitted: (_) => _sendMessage(),
),