chore: follow up Simplify codeblock code
This commit is contained in:
parent
c3ec0491d1
commit
5262395340
1 changed files with 11 additions and 19 deletions
|
|
@ -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':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue