opt: dynamic panel

This commit is contained in:
bggRGjQaUbCoE
2024-12-30 11:56:03 +08:00
parent ef8d57ddfd
commit 753fdeea03
7 changed files with 71 additions and 58 deletions

View File

@@ -38,7 +38,7 @@ class ContentGrpc extends StatelessWidget {
Widget build(BuildContext context) {
TextStyle authorStyle =
TextStyle(color: Theme.of(context).colorScheme.primary);
InlineSpan? richNodes = richNode(item, context);
return Container(
width: double.infinity,
padding: const EdgeInsets.fromLTRB(12, 0, 12, 6),
@@ -53,22 +53,23 @@ class ContentGrpc extends StatelessWidget {
),
),
],
IgnorePointer(
// 禁用SelectableRegion的触摸交互功能
ignoring: source == 'detail' ? false : true,
child: SelectableRegion(
magnifierConfiguration: const TextMagnifierConfiguration(),
focusNode: FocusNode(),
selectionControls: MaterialTextSelectionControls(),
child: Text.rich(
/// fix 默认20px高度
style: const TextStyle(height: 0),
richNode(item, context),
maxLines: source == 'detail' ? 999 : 6,
overflow: TextOverflow.ellipsis,
if (richNodes != null)
IgnorePointer(
// 禁用SelectableRegion的触摸交互功能
ignoring: source == 'detail' ? false : true,
child: SelectableRegion(
magnifierConfiguration: const TextMagnifierConfiguration(),
focusNode: FocusNode(),
selectionControls: MaterialTextSelectionControls(),
child: Text.rich(
/// fix 默认20px高度
style: const TextStyle(height: 0),
richNodes,
maxLines: source == 'detail' ? 999 : 6,
overflow: TextOverflow.ellipsis,
),
),
),
),
if (item.modules.first.moduleDynamic.hasDynDraw())
Text.rich(
picsNodes(),