diff --git a/lib/pages/message/chat_page.dart b/lib/pages/message/chat_page.dart index c3e886b..d653424 100644 --- a/lib/pages/message/chat_page.dart +++ b/lib/pages/message/chat_page.dart @@ -305,18 +305,18 @@ class _ChatPageState extends State { }, ), ), - body: Column( - children: [ - // 消息列表区域 - Expanded( - child: Container( - color: Color(0xffF5F5F5), - child: GestureDetector( - onTap: () { - // 点击消息区域收起键盘 - FocusManager.instance.primaryFocus?.unfocus(); - }, - behavior: HitTestBehavior.opaque, + body: GestureDetector( + onTap: () { + // 点击空白处收起键盘 + FocusManager.instance.primaryFocus?.unfocus(); + }, + behavior: HitTestBehavior.opaque, + child: Column( + children: [ + // 消息列表区域 + Expanded( + child: Container( + color: Color(0xffF5F5F5), child: ListView.builder( controller: _scrollController, reverse: false, @@ -375,7 +375,6 @@ class _ChatPageState extends State { ), ), ), - ), // 使用抽离的聊天输入栏组件 ChatInputBar( onSendMessage: (message) async { @@ -404,6 +403,7 @@ class _ChatPageState extends State { }, ), ], + ), ), ), );