chore: follow up Simplify codeblock code

This commit is contained in:
Christian Kußowski 2025-11-19 10:37:42 +01:00
commit 5262395340
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -369,28 +369,20 @@ class HtmlMessage extends StatelessWidget {
side: const BorderSide(color: hightlightTextColor), side: const BorderSide(color: hightlightTextColor),
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
), ),
child: isInline child: Padding(
? Padding( padding: isInline
padding: const EdgeInsets.symmetric(horizontal: 4.0), ? const EdgeInsets.symmetric(horizontal: 4.0)
child: Text.rich( : const EdgeInsets.symmetric(
TextSpan(
children: [_renderCodeBlockNode(element)],
),
selectionColor: hightlightTextColor.withAlpha(128),
),
)
: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8.0, horizontal: 8.0,
vertical: 4.0, vertical: 4.0,
), ),
child: Text.rich( child: Text.rich(
TextSpan( TextSpan(
children: [_renderCodeBlockNode(element)], children: [_renderCodeBlockNode(element)],
), ),
selectionColor: hightlightTextColor.withAlpha(212), selectionColor: hightlightTextColor.withAlpha(128),
), ),
), ),
), ),
); );
case 'img': case 'img':