High contrast design: black/white, 2px borders, 48px targets, focus ring, boxed chat
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,7 +115,10 @@ class ChatStackLabel extends StatelessWidget {
|
||||
final base = tokens.panelFill(scheme, scheme.surfaceContainerHigh);
|
||||
final color = this.color;
|
||||
final dark = theme.brightness == Brightness.dark;
|
||||
final fill = color == null
|
||||
// A design with a contrast floor marks the chat's colour with a bold
|
||||
// outline rather than a tint.
|
||||
final outlined = color != null && tokens.minContrast != null;
|
||||
final fill = color == null || outlined
|
||||
? base
|
||||
: Color.alphaBlend(color.withValues(alpha: dark ? .22 : .14), base);
|
||||
final style = (theme.textTheme.labelLarge ?? const TextStyle()).copyWith(
|
||||
@@ -125,7 +128,10 @@ class ChatStackLabel extends StatelessWidget {
|
||||
return DecoratedBox(
|
||||
decoration: ShapeDecoration(
|
||||
color: fill,
|
||||
shape: _labelShape(tokens),
|
||||
shape: _labelShape(
|
||||
tokens,
|
||||
outlined ? BorderSide(color: color, width: 3) : null,
|
||||
),
|
||||
shadows: tokens.flat ? null : chatStackShadows(scheme),
|
||||
),
|
||||
child: Padding(
|
||||
@@ -141,8 +147,8 @@ class ChatStackLabel extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
ShapeBorder _labelShape(AppDesignTokens tokens) {
|
||||
final side = tokens.frameSide ?? BorderSide.none;
|
||||
ShapeBorder _labelShape(AppDesignTokens tokens, BorderSide? outline) {
|
||||
final side = outline ?? tokens.frameSide ?? BorderSide.none;
|
||||
final r = tokens.radius;
|
||||
return r == null
|
||||
? StadiumBorder(side: side)
|
||||
|
||||
Reference in New Issue
Block a user