SebastienBtr/Dash-Chat-2

Multiline input doesn't expand

Closed this issue · 1 comments

When creating long input text, it scrolls horizontally, instead of expanding vertically till the number of lines is reached. As I can see in the code the TextField of the input doesn't have any expanded property or min/maxLines property assigned and that might be the problem (it is probably handled in some other way...).

Part of the code:

DashChat(
                  currentUser: _currentUser,
                  inputOptions: InputOptions(
                    inputMaxLines: 5,
                    sendOnEnter: true,
                  onSend: (ChatMessage m) {
                    getChatReponse(m);
                  },
                  messages: _messages,
                ),

Ok, on the second look I have found that when sendOnEnter is true, the maxLines property is always one. Closing this one.

  maxLines: widget.inputOptions.sendOnEnter
                      ? 1
                      : widget.inputOptions.inputMaxLines,