fix(news): use onSurface for article titles instead of primary

Purple-on-black was eye-catching but hard to read. Switch title text
to onSurface for contrast; keep the underline in primary at 70% alpha
as the "this is a link" signal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 18:13:31 -04:00
parent 51f1cffe79
commit 00878a8a42
+8 -4
View File
@@ -113,16 +113,20 @@ class NewsCard extends StatelessWidget {
], ],
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
// Title — tappable if URL present // Title — tappable if URL present. Text stays in onSurface for
// contrast; the primary-colored underline carries the "this is a
// link" signal without tanking readability.
GestureDetector( GestureDetector(
onTap: item.url.isNotEmpty ? _openUrl : null, onTap: item.url.isNotEmpty ? _openUrl : null,
child: Text( child: Text(
item.title, item.title,
style: textTheme.bodyMedium?.copyWith( style: textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: item.url.isNotEmpty ? scheme.primary : scheme.onSurface, color: scheme.onSurface,
height: 1.3,
decoration: item.url.isNotEmpty ? TextDecoration.underline : null, decoration: item.url.isNotEmpty ? TextDecoration.underline : null,
decorationColor: scheme.primary, decorationColor: scheme.primary.withValues(alpha: 0.7),
decorationThickness: 1.5,
), ),
), ),
), ),