Skip to content

Commit

Permalink
bruig: Fix keyboard working message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlyp committed Feb 27, 2024
1 parent e3c7ea0 commit 22e71a9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bruig/flutterui/bruig/lib/components/chat/input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ class _InputState extends State<Input> {
void handleKeyPress(event) {
if (event is RawKeyUpEvent) {
bool modPressed = event.isShiftPressed || event.isControlPressed;
final val = controller.value;
if (event.data.logicalKey.keyLabel == "Enter" && !modPressed) {
sendMsg();
} else {
widget.chat.workingMsg = val.text.trim();
}
}
}
Expand Down Expand Up @@ -104,6 +101,7 @@ class _InputState extends State<Input> {
child: Container(
margin: const EdgeInsets.only(bottom: 5),
child: TextField(
onChanged: (value) => widget.chat.workingMsg = value,
autofocus: isScreenSmall ? false : true,
focusNode: widget.inputFocusNode,
style: TextStyle(
Expand Down

0 comments on commit 22e71a9

Please sign in to comment.