From 32ec8390162d6be6da6922284840a96bf3e796ff Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Thu, 19 Mar 2026 16:39:52 +0530 Subject: [PATCH] feat: Add a mute indicator UI and make the star icon interactive on the chat screen. --- .../presentation/screens/chat_screen.dart | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/lib/features/messaging/presentation/screens/chat_screen.dart b/lib/features/messaging/presentation/screens/chat_screen.dart index 0513e82..52a1552 100644 --- a/lib/features/messaging/presentation/screens/chat_screen.dart +++ b/lib/features/messaging/presentation/screens/chat_screen.dart @@ -30,6 +30,7 @@ class _ChatScreenState extends ConsumerState final FocusNode _messageFocusNode = FocusNode(); bool _isComposing = false; bool _isMuted = false; + bool _isStarred = false; int _previousMessageCount = 0; final SocketService _socket = SocketService(); @@ -520,13 +521,33 @@ class _ChatScreenState extends ConsumerState ), ], ), + // Mute indicator + if (_isMuted) + Container( + padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 3), + decoration: BoxDecoration( + color: AppColors.primaryDark.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(8), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.volume_off_rounded, size: 14, color: AppColors.primaryDark.withValues(alpha: 0.6)), + const SizedBox(width: 2), + Text('Muted', style: TextStyle(fontSize: 10, color: AppColors.primaryDark.withValues(alpha: 0.6), fontFamily: 'SourceSerif4')), + ], + ), + ), // Star icon - Padding( - padding: const EdgeInsets.only(right: 4), - child: Icon( - Icons.star_rounded, - size: 24, - color: AppColors.accentOrange, + GestureDetector( + onTap: () => setState(() => _isStarred = !_isStarred), + child: Padding( + padding: const EdgeInsets.only(right: 4), + child: Icon( + _isStarred ? Icons.star_rounded : Icons.star_outline_rounded, + size: 24, + color: _isStarred ? AppColors.accentOrange : AppColors.primaryDark.withValues(alpha: 0.4), + ), ), ), ],