fixed chat bubble link styling and gesture handling, and added android package visibility for common schemes

This commit is contained in:
2026-05-10 00:54:13 +02:00
parent 1ff57b29f9
commit ed2badfd35
3 changed files with 51 additions and 9 deletions
@@ -98,9 +98,21 @@ class _HighlightedLinkifyState extends State<HighlightedLinkify> {
final defaultStyle = widget.style ??
Theme.of(context).textTheme.bodyMedium ??
DefaultTextStyle.of(context).style;
final linkStyle = (widget.linkStyle ??
const TextStyle(color: Colors.blue, decoration: TextDecoration.underline))
.merge(defaultStyle.copyWith(color: null, decoration: null));
// Start from the surrounding text style so links inherit font family,
// size, weight, etc., then layer the link-specific color and underline
// on top. (Going the other way around — link style as base — used to
// work because TextStyle.copyWith treats `null` as "leave unchanged",
// so the explicit `color: null, decoration: null` were silently
// ignored and the merge pulled defaultStyle's color/decoration over
// the blue + underline. Result: links rendered in body-text color
// with no underline.)
final linkStyle = defaultStyle.merge(
widget.linkStyle ??
const TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline,
),
);
const linkHighlight = TextStyle(
backgroundColor: Color(0xFFFFD54F),
color: Colors.black,