|
|
@@ -1,16 +1,10 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
-import 'package:get/get.dart';
|
|
|
import 'package:keyboard/base/base_view.dart';
|
|
|
-import 'package:keyboard/module/intimacy_analyse/analyse_report/widget/report_item_widget.dart';
|
|
|
-import 'package:keyboard/module/intimacy_analyse/analyse_report/widget/report_title_widget.dart';
|
|
|
-
|
|
|
-import '../../../data/bean/intimacy_analyse_report.dart';
|
|
|
import '../../../resource/assets.gen.dart';
|
|
|
import '../../../resource/colors.gen.dart';
|
|
|
import '../../../resource/string.gen.dart';
|
|
|
-import '../../../widget/avatar/avatar_image_widget.dart';
|
|
|
-import '../../../widget/markdown/markdown_viewer.dart';
|
|
|
+import '../widget/intimacy_analyse_report_widget.dart';
|
|
|
import '../widget/intimacy_user_widget.dart';
|
|
|
import 'intimacy_analyse_report_view_controller.dart';
|
|
|
|
|
|
@@ -28,21 +22,44 @@ class IntimacyAnalyseReportView
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
return Stack(
|
|
|
children: [
|
|
|
- Column(
|
|
|
- children: [
|
|
|
- SizedBox(height: 35.h),
|
|
|
- // 亲密度档案
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: [_buildIntimacyArchives()],
|
|
|
+ Positioned.fill(
|
|
|
+ child: SizedBox(
|
|
|
+ width: double.infinity,
|
|
|
+ height: double.infinity,
|
|
|
+ child: SingleChildScrollView(
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 35.h),
|
|
|
+ // 亲密度档案
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [_buildIntimacyArchives()],
|
|
|
+ ),
|
|
|
+ SizedBox(height: 12.h),
|
|
|
+ // 切换亲密度
|
|
|
+ _buildIntimacyArchivesSwitchLayout(),
|
|
|
+ SizedBox(height: 18.h),
|
|
|
+ // 报告预览
|
|
|
+ IntimacyAnalyseReportWidget(
|
|
|
+ reportContent: controller.reportPreviewData.value,
|
|
|
+ isPreview: true,
|
|
|
+ ),
|
|
|
+ SizedBox(height: 120.h),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- SizedBox(height: 12.h),
|
|
|
- // 切换亲密度
|
|
|
- _buildIntimacyArchivesSwitchLayout(),
|
|
|
- SizedBox(height: 18.h),
|
|
|
- // 报告预览
|
|
|
- Expanded(child: _buildReportPreview()),
|
|
|
- ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ // 底部阴影
|
|
|
+ Positioned(
|
|
|
+ left: 0,
|
|
|
+ right: 0,
|
|
|
+ bottom: 0,
|
|
|
+ child: Container(
|
|
|
+ child: Assets.images.bgIntimacyAnalyseReportPreviewMask.image(
|
|
|
+ height: 126,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
// 解锁按钮
|
|
|
Positioned.fill(
|
|
|
@@ -92,97 +109,6 @@ class IntimacyAnalyseReportView
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- /// 报告预览布局-顶部布局-包含:图标和标题
|
|
|
- Widget _buildReportPreviewTopLayout() {
|
|
|
- return Row(
|
|
|
- children: [
|
|
|
- Assets.images.iconIntimacyAnalyseReportPreviewLove.image(
|
|
|
- width: 50,
|
|
|
- height: 48,
|
|
|
- ),
|
|
|
- Assets.images.iconIntimacyAnalyseReportPreviewTitle.image(
|
|
|
- width: 178,
|
|
|
- height: 24,
|
|
|
- ),
|
|
|
- ],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- /// 报告预览
|
|
|
- Widget _buildReportPreview() {
|
|
|
- return Obx(() {
|
|
|
- // 卡片背景
|
|
|
- return Stack(
|
|
|
- // 让大小,撑满父组件
|
|
|
- fit: StackFit.expand,
|
|
|
- children: [
|
|
|
- // 中间内容
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(left: 12, right: 12, bottom: 0),
|
|
|
- padding: EdgeInsets.only(bottom: 12),
|
|
|
- decoration: BoxDecoration(
|
|
|
- image: DecorationImage(
|
|
|
- image: Assets.images.bgIntimacyAnalyseReportPreview.provider(),
|
|
|
- fit: BoxFit.fill,
|
|
|
- ),
|
|
|
- ),
|
|
|
- // 圆角背景
|
|
|
- child: Stack(
|
|
|
- children: [
|
|
|
- // 图标和标题
|
|
|
- _buildReportPreviewTopLayout(),
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(
|
|
|
- top: 51,
|
|
|
- left: 12,
|
|
|
- right: 12,
|
|
|
- bottom: 5,
|
|
|
- ),
|
|
|
- decoration: ShapeDecoration(
|
|
|
- color: ColorName.white,
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
- borderRadius: BorderRadius.circular(20.r),
|
|
|
- ),
|
|
|
- ),
|
|
|
- child: Padding(
|
|
|
- padding: const EdgeInsets.only(
|
|
|
- left: 14,
|
|
|
- right: 14,
|
|
|
- bottom: 90,
|
|
|
- ),
|
|
|
- // 内容
|
|
|
- child: Stack(
|
|
|
- // 撑满父组件
|
|
|
- fit: StackFit.expand,
|
|
|
- children: [
|
|
|
- MarkdownViewer(
|
|
|
- content: controller.reportPreviewData.value,
|
|
|
- // 允许滚动
|
|
|
- enableContentScroll: true,
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
- // 底部阴影
|
|
|
- Positioned(
|
|
|
- left: 0,
|
|
|
- right: 0,
|
|
|
- bottom: 0,
|
|
|
- child: Container(
|
|
|
- child: Assets.images.bgIntimacyAnalyseReportPreviewMask.image(
|
|
|
- height: 126,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ],
|
|
|
- );
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
/// 底部布局
|
|
|
Widget _buildBottomLayout(BuildContext context) {
|
|
|
return Column(
|