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,18 +369,10 @@ 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,
|
||||||
),
|
),
|
||||||
|
|
@ -388,7 +380,7 @@ class HtmlMessage extends StatelessWidget {
|
||||||
TextSpan(
|
TextSpan(
|
||||||
children: [_renderCodeBlockNode(element)],
|
children: [_renderCodeBlockNode(element)],
|
||||||
),
|
),
|
||||||
selectionColor: hightlightTextColor.withAlpha(212),
|
selectionColor: hightlightTextColor.withAlpha(128),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue