|
|
@@ -9,6 +9,7 @@ import '../../../data/bean/intimacy_analyse_report.dart';
|
|
|
import '../../../resource/assets.gen.dart';
|
|
|
import '../../../resource/colors.gen.dart';
|
|
|
import '../../../widget/avatar/avatar_image_widget.dart';
|
|
|
+import '../../../widget/markdown/markdown_viewer.dart';
|
|
|
import '../widget/intimacy_user_widget.dart';
|
|
|
import 'intimacy_analyse_report_view_controller.dart';
|
|
|
|
|
|
@@ -146,7 +147,6 @@ class IntimacyAnalyseReportView
|
|
|
padding: const EdgeInsets.only(
|
|
|
left: 14,
|
|
|
right: 14,
|
|
|
- top: 20,
|
|
|
bottom: 14,
|
|
|
),
|
|
|
// 内容
|
|
|
@@ -154,10 +154,10 @@ class IntimacyAnalyseReportView
|
|
|
// 撑满父组件
|
|
|
fit: StackFit.expand,
|
|
|
children: [
|
|
|
- SingleChildScrollView(
|
|
|
- child: _buildReportContent(
|
|
|
- controller.reportPreviewData.value,
|
|
|
- ),
|
|
|
+ MarkdownViewer(
|
|
|
+ content: controller.reportPreviewData.value,
|
|
|
+ // 允许滚动
|
|
|
+ enableContentScroll: true,
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
@@ -182,23 +182,12 @@ class IntimacyAnalyseReportView
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- /// 报告内容
|
|
|
- Widget _buildReportContent(IntimacyAnalyseReport report) {
|
|
|
- return Column(
|
|
|
- children: [
|
|
|
- // 报告列表
|
|
|
- ...report.list.map((ele) {
|
|
|
- return ReportItemWidget(item: ele);
|
|
|
- }),
|
|
|
- ],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
/// 底部布局
|
|
|
Widget _buildBottomLayout(BuildContext context) {
|
|
|
return Column(
|
|
|
// 高度包裹内容,否则会撑满父组件
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
_buildReportPreviewBubble(),
|
|
|
_buildUnlockBtn(context),
|
|
|
@@ -210,7 +199,7 @@ class IntimacyAnalyseReportView
|
|
|
/// 报告预览布局-气泡
|
|
|
Widget _buildReportPreviewBubble() {
|
|
|
return Container(
|
|
|
- margin: EdgeInsets.only(left: 16, right: 58, bottom: 3),
|
|
|
+ margin: EdgeInsets.only(left: 16, bottom: 3),
|
|
|
padding: EdgeInsets.only(bottom: 3, right: 15),
|
|
|
decoration: BoxDecoration(
|
|
|
image: DecorationImage(
|
|
|
@@ -229,6 +218,10 @@ class IntimacyAnalyseReportView
|
|
|
padding: EdgeInsets.only(left: 38, top: 7, bottom: 8),
|
|
|
child: Text(
|
|
|
controller.reportPreviewBubbleText.value,
|
|
|
+ // 超出则显示省略号
|
|
|
+ overflow: TextOverflow.ellipsis,
|
|
|
+ // 单行显示
|
|
|
+ maxLines: 1,
|
|
|
style: TextStyle(
|
|
|
color: ColorName.black65,
|
|
|
fontSize: 11.sp,
|