|
|
|
@ -22,10 +22,6 @@ class _ChatInputBarState extends State<ChatInputBar> { |
|
|
|
|
|
|
|
void _handleSendMessage() { |
|
|
|
if (_textController.text.isNotEmpty) { |
|
|
|
// 使用GetX日志而不是print |
|
|
|
if (Get.isLogEnable) { |
|
|
|
Get.log("发送消息: ${_textController.text}"); |
|
|
|
} |
|
|
|
widget.onSendMessage(_textController.text); |
|
|
|
_textController.clear(); |
|
|
|
} |
|
|
|
@ -41,9 +37,6 @@ class _ChatInputBarState extends State<ChatInputBar> { |
|
|
|
} |
|
|
|
|
|
|
|
void _handleImageTap(List<String> imagePaths) { |
|
|
|
if (Get.isLogEnable) { |
|
|
|
Get.log("选择了图片: $imagePaths"); |
|
|
|
} |
|
|
|
// 将图片路径列表传递给父组件 |
|
|
|
if (widget.onImageSelected != null) { |
|
|
|
widget.onImageSelected!(imagePaths); |
|
|
|
@ -51,9 +44,6 @@ class _ChatInputBarState extends State<ChatInputBar> { |
|
|
|
} |
|
|
|
|
|
|
|
void _handleCameraTap(String imagePath) { |
|
|
|
if (Get.isLogEnable) { |
|
|
|
Get.log("拍摄了照片: $imagePath"); |
|
|
|
} |
|
|
|
// 将单个图片路径包装成列表传递给父组件 |
|
|
|
if (widget.onImageSelected != null) { |
|
|
|
widget.onImageSelected!([imagePath]); |
|
|
|
|