From 810b44975d424f4891cce7e188906a609ec209e5 Mon Sep 17 00:00:00 2001 From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com> Date: Sun, 19 Oct 2025 23:07:36 +0530 Subject: [PATCH] refactor: Enhance chat input interaction with state-based overlay colors - Implemented state-based overlay color changes for the chat input's InkWell widget to improve user feedback during interactions. - Adjusted the color of the chat input icon to align with the primary button text color, enhancing visual consistency and usability. --- .../chat/widgets/modern_chat_input.dart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/features/chat/widgets/modern_chat_input.dart b/lib/features/chat/widgets/modern_chat_input.dart index eb1a250..d1a1632 100644 --- a/lib/features/chat/widgets/modern_chat_input.dart +++ b/lib/features/chat/widgets/modern_chat_input.dart @@ -1339,6 +1339,21 @@ class _ModernChatInputState extends ConsumerState ), child: InkWell( borderRadius: BorderRadius.circular(radius), + overlayColor: WidgetStateProperty.resolveWith(( + Set states, + ) { + if (states.contains(WidgetState.pressed)) { + return context.conduitTheme.error.withValues( + alpha: Alpha.buttonPressed, + ); + } + if (states.contains(WidgetState.hovered)) { + return context.conduitTheme.error.withValues( + alpha: Alpha.hover, + ); + } + return Colors.transparent; + }), onTap: () { HapticFeedback.lightImpact(); stopGeneration(); @@ -1357,7 +1372,7 @@ class _ModernChatInputState extends ConsumerState child: Icon( Platform.isIOS ? CupertinoIcons.stop_fill : Icons.stop, size: IconSize.large, - color: context.conduitTheme.error, + color: context.conduitTheme.buttonPrimaryText, ), ), ),