mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-04 17:50:13 +08:00
@@ -25,44 +25,47 @@ class AiConclusionPanel extends CommonSlidePage {
|
||||
Key? key,
|
||||
bool tap = true,
|
||||
}) {
|
||||
return CustomScrollView(
|
||||
key: key,
|
||||
shrinkWrap: !tap,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
if (res.summary?.isNotEmpty == true) ...[
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||
child: SelectableText(
|
||||
res.summary!,
|
||||
style: const TextStyle(fontSize: 15, height: 1.5),
|
||||
scrollPhysics: const NeverScrollableScrollPhysics(),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (res.outline?.isNotEmpty == true)
|
||||
final outline = res.outline;
|
||||
final hasOutline = outline != null && outline.isNotEmpty;
|
||||
return SelectionArea(
|
||||
child: CustomScrollView(
|
||||
key: key,
|
||||
shrinkWrap: !tap,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
if (res.summary?.isNotEmpty == true) ...[
|
||||
SliverToBoxAdapter(
|
||||
child: Divider(
|
||||
height: 20,
|
||||
color: theme.dividerColor.withValues(alpha: 0.1),
|
||||
thickness: 6,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||
child: Text(
|
||||
res.summary!,
|
||||
style: const TextStyle(fontSize: 15, height: 1.5),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
if (res.outline?.isNotEmpty == true)
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 14,
|
||||
right: 14,
|
||||
bottom: !tap ? 0 : MediaQuery.viewPaddingOf(context).bottom + 100,
|
||||
),
|
||||
sliver: SliverList.builder(
|
||||
itemCount: res.outline!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = res.outline![index];
|
||||
return SelectionArea(
|
||||
child: Column(
|
||||
if (hasOutline)
|
||||
SliverToBoxAdapter(
|
||||
child: Divider(
|
||||
height: 20,
|
||||
color: theme.dividerColor.withValues(alpha: 0.1),
|
||||
thickness: 6,
|
||||
),
|
||||
),
|
||||
],
|
||||
if (hasOutline)
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 14,
|
||||
right: 14,
|
||||
bottom: !tap
|
||||
? 0
|
||||
: MediaQuery.viewPaddingOf(context).bottom + 100,
|
||||
),
|
||||
sliver: SliverList.builder(
|
||||
itemCount: outline.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = outline[index];
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (index != 0) const SizedBox(height: 10),
|
||||
@@ -120,12 +123,12 @@ class AiConclusionPanel extends CommonSlidePage {
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user