mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: ai conclusion page
This commit is contained in:
@@ -39,11 +39,9 @@ class ModelResult {
|
|||||||
ModelResult.fromJson(Map<String, dynamic> json) {
|
ModelResult.fromJson(Map<String, dynamic> json) {
|
||||||
resultType = json['result_type'];
|
resultType = json['result_type'];
|
||||||
summary = json['summary'];
|
summary = json['summary'];
|
||||||
outline = json['result_type'] == 2
|
outline = json['outline']
|
||||||
? json['outline']
|
.map<OutlineItem>((e) => OutlineItem.fromJson(e))
|
||||||
.map<OutlineItem>((e) => OutlineItem.fromJson(e))
|
.toList();
|
||||||
.toList()
|
|
||||||
: <OutlineItem>[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ class AiDetail extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Theme.of(context).colorScheme.background,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
padding: const EdgeInsets.only(left: 14, right: 14),
|
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||||
height: Utils.getSheetHeight(context),
|
height: Utils.getSheetHeight(context),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@@ -43,15 +43,22 @@ class AiDetail extends StatelessWidget {
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
if (modelResult!.summary != null &&
|
||||||
modelResult!.summary!,
|
modelResult!.summary!.isNotEmpty) ...[
|
||||||
style: const TextStyle(
|
Text(
|
||||||
fontSize: 15,
|
'总结: ${modelResult!.summary!}',
|
||||||
fontWeight: FontWeight.bold,
|
style: const TextStyle(
|
||||||
height: 1.5,
|
fontSize: 15,
|
||||||
|
height: 1.5,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
if (modelResult!.outline!.isNotEmpty)
|
||||||
const SizedBox(height: 20),
|
Divider(
|
||||||
|
height: 20,
|
||||||
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
|
thickness: 6,
|
||||||
|
)
|
||||||
|
],
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemCount: modelResult!.outline!.length,
|
itemCount: modelResult!.outline!.length,
|
||||||
@@ -85,7 +92,7 @@ class AiDetail extends StatelessWidget {
|
|||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onBackground,
|
.onSurface,
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
Reference in New Issue
Block a user