diff --git a/App-Installers/AIChatLab-Setup.exe b/App-Installers/AIChatLab-Setup.exe index 5b78825..786c648 100644 Binary files a/App-Installers/AIChatLab-Setup.exe and b/App-Installers/AIChatLab-Setup.exe differ diff --git a/Chat-App/lib/screens/chat_screen.dart b/Chat-App/lib/screens/chat_screen.dart index 18e8c80..8e3bfb5 100644 --- a/Chat-App/lib/screens/chat_screen.dart +++ b/Chat-App/lib/screens/chat_screen.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:ai_chat_lab/services/convai_service.dart'; import 'package:ai_chat_lab/services/storage_service.dart'; import 'package:ai_chat_lab/screens/settings_screen.dart'; @@ -487,38 +486,27 @@ class _ChatScreenState extends State { ) else ...[ Expanded( - child: KeyboardListener( - focusNode: FocusNode(), - onKeyEvent: (KeyEvent event) { - if (event is KeyDownEvent) { - if (event.logicalKey == LogicalKeyboardKey.enter) { - if (!HardwareKeyboard.instance.isShiftPressed) { - _sendMessage(); - } - } - } - }, - child: TextField( - controller: _messageController, - decoration: InputDecoration( - hintText: 'Type your message... (Enter to send, Shift+Enter for new line)', - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(24), - borderSide: const BorderSide(color: Color(0xFFCBD5E1)), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(24), - borderSide: const BorderSide(color: Color(0xFF4F8CFF), width: 2), - ), - contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), - filled: true, - fillColor: Colors.white, + child: TextField( + controller: _messageController, + decoration: InputDecoration( + hintText: 'Type your message...', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(24), + borderSide: const BorderSide(color: Color(0xFFCBD5E1)), ), - keyboardType: TextInputType.multiline, - maxLines: null, - minLines: 1, - textCapitalization: TextCapitalization.sentences, + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(24), + borderSide: const BorderSide(color: Color(0xFF4F8CFF), width: 2), + ), + contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), + filled: true, + fillColor: Colors.white, ), + maxLines: 5, + minLines: 1, + textCapitalization: TextCapitalization.sentences, + textInputAction: TextInputAction.send, + onSubmitted: (_) => _sendMessage(), ), ), const SizedBox(width: 8),