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

@@ -36,6 +36,7 @@ class Content 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,
@@ -51,25 +52,26 @@ class Content extends StatelessWidget {
),
),
],
IgnorePointer(
// 禁用SelectableRegion的触摸交互功能
ignoring: source == 'detail' ? false : true,
child: SelectableRegion(
magnifierConfiguration: const TextMagnifierConfiguration(),
focusNode: FocusNode(),
selectionControls: MaterialTextSelectionControls(),
child: Text.rich(
/// fix 默认20px高度
style: TextStyle(
height: 0,
fontSize: source == 'detail' ? 16 : 15,
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: TextStyle(
height: 0,
fontSize: source == 'detail' ? 16 : 15,
),
richNodes,
maxLines: source == 'detail' ? 999 : 6,
overflow: TextOverflow.ellipsis,
),
richNode(item, context),
maxLines: source == 'detail' ? 999 : 6,
overflow: TextOverflow.ellipsis,
),
),
),
if (item.modules.moduleDynamic.major != null &&
item.modules.moduleDynamic.major.opus != null &&
item.modules.moduleDynamic.major.opus.pics.isNotEmpty)