Strengthen active chat marker and fade identity tint across selection

This commit is contained in:
2026-11-07 14:34:06 +00:00
parent b7fc221360
commit cc28dcbca0
7 changed files with 49 additions and 20 deletions
@@ -76,7 +76,7 @@ class ChatCompactSidebar extends StatelessWidget {
duration: MediaQuery.disableAnimationsOf(context)
? Duration.zero
: const Duration(milliseconds: 200),
color: color.withValues(alpha: selected ? .24 : .07),
color: selected ? Colors.transparent : color.withValues(alpha: .07),
child: _button(
context,
chatSessionTitle(row),
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'chat_color_palette.dart';
/// A chat's colour identifies it; this animated edge identifies where it is
/// visible. The active chat has a stronger edge in both list presentations.
@@ -20,7 +21,7 @@ class ChatVisibilityMarker extends StatelessWidget {
@override
Widget build(BuildContext context) => Semantics(
label: active
label: visible && active
? 'Active chat'
: visible
? 'Visible chat'
@@ -29,12 +30,24 @@ class ChatVisibilityMarker extends StatelessWidget {
key: ValueKey('chat-visibility-$sessionId'),
duration: MediaQuery.disableAnimationsOf(context)
? Duration.zero
: const Duration(milliseconds: 200),
: const Duration(milliseconds: 220),
curve: Curves.easeInOut,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd,
colors: [
color.withValues(
alpha: active ? (chatColorDarkSurface(context) ? .30 : .22) : 0,
),
color.withValues(alpha: active ? .06 : 0),
],
),
),
foregroundDecoration: BoxDecoration(
border: BorderDirectional(
start: visible
? BorderSide(color: color, width: active ? 7 : 3)
? BorderSide(color: color, width: active ? 10 : 3)
: BorderSide.none,
),
),
@@ -78,6 +78,7 @@ class ChatSessionRow extends StatelessWidget {
key: Key('chat-row-$id'),
cupertino: cupertino,
selected: selected,
selectedFill: Colors.transparent,
emphasized: unread,
divider: divider,
onTap: () => onOpen(session),