|
|
@@ -17,6 +17,7 @@ import '../../../router/app_pages.dart';
|
|
|
import '../../../utils/string_format_util.dart';
|
|
|
import '../../../widget/actionbtn/action_btn.dart';
|
|
|
import '../../../widget/gradient_text.dart';
|
|
|
+import '../widget/intimacy_analyse_report_widget.dart';
|
|
|
import '../widget/intimacy_user_widget.dart';
|
|
|
import '../widget/option_select_widget.dart';
|
|
|
import '../widget/step_card.dart';
|
|
|
@@ -254,9 +255,9 @@ class IntimacyAnalyseUploadPage
|
|
|
children: [
|
|
|
// 预测方向
|
|
|
_buildDirectionResult(),
|
|
|
- SizedBox(width: 12.w,),
|
|
|
+ SizedBox(width: 12.w),
|
|
|
// 模型
|
|
|
- _buildAiModelResult()
|
|
|
+ _buildAiModelResult(),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
@@ -265,6 +266,18 @@ class IntimacyAnalyseUploadPage
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ /// 分析报告
|
|
|
+ Widget _buildAnalysisReport() {
|
|
|
+ return Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 12.h),
|
|
|
+ IntimacyAnalyseReportWidget(
|
|
|
+ reportContent: controller.reportMarkdownData.value,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
/// 预测方向结果
|
|
|
Widget _buildDirectionResult() {
|
|
|
return Expanded(
|
|
|
@@ -544,14 +557,34 @@ class IntimacyAnalyseUploadPage
|
|
|
|
|
|
/// 底部操作按钮
|
|
|
Widget _buildBottomActionBtn() {
|
|
|
- return Container(
|
|
|
- width: double.maxFinite,
|
|
|
- margin: EdgeInsets.only(left: 13.w, top: 8.h, right: 13.w, bottom: 20.h),
|
|
|
- child: ActionBtn(
|
|
|
- leftBtn: _buildAiModelSwitchBtn(),
|
|
|
- rightBtn: _buildNextBtn(),
|
|
|
- ),
|
|
|
- );
|
|
|
+ if (controller.isUploadPage.value) {
|
|
|
+ // 上传页
|
|
|
+ return Container(
|
|
|
+ width: double.maxFinite,
|
|
|
+ margin: EdgeInsets.only(
|
|
|
+ left: 13.w,
|
|
|
+ top: 8.h,
|
|
|
+ right: 13.w,
|
|
|
+ bottom: 20.h,
|
|
|
+ ),
|
|
|
+ child: ActionBtn(
|
|
|
+ leftBtn: _buildAiModelSwitchBtn(),
|
|
|
+ rightBtn: _buildNextBtn(),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // 结果页
|
|
|
+ return Container(
|
|
|
+ width: double.maxFinite,
|
|
|
+ margin: EdgeInsets.only(
|
|
|
+ left: 13.w,
|
|
|
+ top: 8.h,
|
|
|
+ right: 13.w,
|
|
|
+ bottom: 20.h,
|
|
|
+ ),
|
|
|
+ child: _buildAnalyseBtn(),
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// Ai模型切换按钮
|
|
|
@@ -649,24 +682,81 @@ class IntimacyAnalyseUploadPage
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ /// 分析按钮
|
|
|
+ Widget _buildAnalyseBtn() {
|
|
|
+ return Container(
|
|
|
+ padding: EdgeInsets.only(top: 7.h, bottom: 6.h),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.colorBrand,
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(30.r)),
|
|
|
+ ),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ // 标题
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ Assets.images.iconLock.image(width: 22.w, height: 22.h),
|
|
|
+ SizedBox(width: 2.w),
|
|
|
+ Text(
|
|
|
+ StringName.intimacyAnalyseAnalysisNow,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.white,
|
|
|
+ fontSize: 16.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ SizedBox(height: 3.h),
|
|
|
+ // 描述
|
|
|
+ Text(
|
|
|
+ StringName.intimacyAnalyseAnalysisUseAiTip,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.white,
|
|
|
+ fontSize: 10.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 构建卡片列表
|
|
|
+ Widget _buildCardList() {
|
|
|
+ // 上传页
|
|
|
+ if (controller.isUploadPage.value) {
|
|
|
+ return Column(
|
|
|
+ children: [
|
|
|
+ // 上传卡片
|
|
|
+ _buildUploadStepCard(),
|
|
|
+ // 预测方向卡片
|
|
|
+ _buildPredictionDirectionStepCard(),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // 报告页
|
|
|
+ return Column(
|
|
|
+ children: [
|
|
|
+ // 分析结果卡片
|
|
|
+ _buildAnalysisResultCard(),
|
|
|
+ // 报告结果卡片
|
|
|
+ _buildAnalysisReport(),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// 内容
|
|
|
Widget _buildContent() {
|
|
|
return Expanded(
|
|
|
child: Stack(
|
|
|
children: [
|
|
|
- // 长列表
|
|
|
+ // 卡片列表
|
|
|
SingleChildScrollView(
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- // 上传卡片
|
|
|
- _buildUploadStepCard(),
|
|
|
- // 分析结果卡片
|
|
|
- _buildAnalysisResultCard(),
|
|
|
- // 预测方向卡片
|
|
|
- _buildPredictionDirectionStepCard(),
|
|
|
- SizedBox(height: 80.h),
|
|
|
- ],
|
|
|
- ),
|
|
|
+ child: Column(children: [_buildCardList(), SizedBox(height: 80.h)]),
|
|
|
),
|
|
|
// 底部操作按钮
|
|
|
Positioned(
|