|
|
@@ -17,6 +17,7 @@ import '../../../router/app_pages.dart';
|
|
|
import '../../../utils/string_format_util.dart';
|
|
|
import '../../../widget/gradient_text.dart';
|
|
|
import '../widget/intimacy_user_widget.dart';
|
|
|
+import '../widget/step_card.dart';
|
|
|
import 'intimacy_analyse_upload_controller.dart';
|
|
|
|
|
|
/// 亲密度分析上传页
|
|
|
@@ -114,106 +115,88 @@ class IntimacyAnalyseUploadPage
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- /// 步骤标题
|
|
|
- Widget _buildStepTitle(int step, String title) {
|
|
|
- return Row(
|
|
|
- children: [
|
|
|
- // 步骤标签
|
|
|
- StepLabelWidget(
|
|
|
- label: StringFormatUtil.formatStr(
|
|
|
- StringName.intimacyAnalyseStep,
|
|
|
- step.toString(),
|
|
|
- ),
|
|
|
- ),
|
|
|
- SizedBox(width: 10.w),
|
|
|
- // 标题
|
|
|
- GradientText(
|
|
|
- // 渐变颜色
|
|
|
- colors: [ColorName.stepTitleColor1, ColorName.stepTitleColor2],
|
|
|
- child: Text(
|
|
|
- title,
|
|
|
- style: TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w700),
|
|
|
+ /// 上传步骤卡片
|
|
|
+ Widget _buildUploadStepCard() {
|
|
|
+ return StepCard(
|
|
|
+ bgImageProvider: Assets.images.bgIntimacyAnalyseUploadCard.provider(),
|
|
|
+ stepLabel: StringFormatUtil.formatStr(
|
|
|
+ StringName.intimacyAnalyseStep,
|
|
|
+ 1.toString(),
|
|
|
+ ),
|
|
|
+ stepTitle: StringName.intimacyAnalyseStepTitleSelectImage,
|
|
|
+ stepDesc: StringName.intimacyAnalyseUploadCardTip,
|
|
|
+ topIconWidget: Assets.images.iconIntimacyAnalyseUploadTop.image(
|
|
|
+ height: 63.h,
|
|
|
+ width: 103.w,
|
|
|
+ ),
|
|
|
+ contentWidget: Column(
|
|
|
+ children: [
|
|
|
+ // 九宫格
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(left: 12.w, right: 12.w),
|
|
|
+ padding: EdgeInsets.only(
|
|
|
+ left: 12.w,
|
|
|
+ top: 12.h,
|
|
|
+ right: 12.w,
|
|
|
+ bottom: 12.h,
|
|
|
+ ),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.white,
|
|
|
+ borderRadius: BorderRadius.circular(16.r),
|
|
|
+ ),
|
|
|
+ child: UploadNineGrid(
|
|
|
+ mode: Mode.edit,
|
|
|
+ imageSrcList: ["", "", "", "", "", "", ""],
|
|
|
+ maxCount: 9,
|
|
|
+ spacing: 8.0,
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- ],
|
|
|
+ SizedBox(height: 10.h),
|
|
|
+ // 当前的亲密关系
|
|
|
+ _buildRecommendIntimacy(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- /// 构建上传卡片
|
|
|
- Widget _buildUploadCard() {
|
|
|
- return Container(
|
|
|
- margin: EdgeInsets.only(left: 12.w, top: 10.h, right: 12.w),
|
|
|
- child: Stack(
|
|
|
- // 不裁切超出区域的子组件,例如下面的顶部的图标
|
|
|
- clipBehavior: Clip.none,
|
|
|
+ /// 预测方向步骤卡片
|
|
|
+ Widget _buildPredictionDirectionStepCard() {
|
|
|
+ return StepCard(
|
|
|
+ bgImageProvider: Assets.images.bgIntimacyAnalyseNormalCard.provider(),
|
|
|
+ stepLabel: StringFormatUtil.formatStr(
|
|
|
+ StringName.intimacyAnalyseStep,
|
|
|
+ 2.toString(),
|
|
|
+ ),
|
|
|
+ stepTitle: StringName.intimacyAnalyseStepTitleSelectPredictionDirection,
|
|
|
+ stepDesc: StringName.intimacyAnalysePredictionDirectionCardTip,
|
|
|
+ contentWidget: Column(
|
|
|
children: [
|
|
|
- // 顶部的图标
|
|
|
- Positioned(
|
|
|
- top: -11.h,
|
|
|
- right: 0,
|
|
|
- child: Assets.images.iconIntimacyAnalyseUploadTop.image(
|
|
|
- height: 63.h,
|
|
|
- width: 103.w,
|
|
|
- ),
|
|
|
- ),
|
|
|
- // 卡片背景
|
|
|
+ // 九宫格
|
|
|
Container(
|
|
|
+ margin: EdgeInsets.only(left: 12.w, right: 12.w),
|
|
|
+ padding: EdgeInsets.only(
|
|
|
+ left: 12.w,
|
|
|
+ top: 12.h,
|
|
|
+ right: 12.w,
|
|
|
+ bottom: 12.h,
|
|
|
+ ),
|
|
|
decoration: BoxDecoration(
|
|
|
- image: DecorationImage(
|
|
|
- image: Assets.images.bgIntimacyAnalyseUploadCard.provider(),
|
|
|
- fit: BoxFit.fill,
|
|
|
- ),
|
|
|
+ color: ColorName.white,
|
|
|
+ borderRadius: BorderRadius.circular(16.r),
|
|
|
),
|
|
|
- child: Column(
|
|
|
- // 左对齐
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- // 步骤1
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(left: 12.w, top: 16.h),
|
|
|
- child: _buildStepTitle(
|
|
|
- 1,
|
|
|
- StringName.intimacyAnalyseStepTitleSelectImage,
|
|
|
- ),
|
|
|
- ),
|
|
|
- SizedBox(height: 4.h),
|
|
|
- // 提示文字
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(left: 12.w),
|
|
|
- child: Text(
|
|
|
- StringName.intimacyAnalyseUploadCardTip,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
- color: ColorName.black60,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- SizedBox(height: 16.h),
|
|
|
- // 九宫格
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(left: 12.w, right: 12.w),
|
|
|
- padding: EdgeInsets.only(
|
|
|
- left: 12.w,
|
|
|
- top: 12.h,
|
|
|
- right: 12.w,
|
|
|
- bottom: 12.h,
|
|
|
- ),
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: ColorName.white,
|
|
|
- borderRadius: BorderRadius.circular(16.r),
|
|
|
- ),
|
|
|
- child: UploadNineGrid(
|
|
|
- imageUrls: ["", "", "", "", "", "", ""],
|
|
|
- maxCount: 9,
|
|
|
- spacing: 8.0,
|
|
|
- ),
|
|
|
- ),
|
|
|
- SizedBox(height: 10.h),
|
|
|
- // 当前的亲密关系
|
|
|
- _buildRecommendIntimacy(),
|
|
|
- SizedBox(height: 18.h),
|
|
|
+ child: UploadNineGrid(
|
|
|
+ mode: Mode.preview,
|
|
|
+ imageSrcList: [
|
|
|
+ "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
],
|
|
|
+ maxCount: 9,
|
|
|
+ spacing: 8.0,
|
|
|
),
|
|
|
),
|
|
|
],
|
|
|
@@ -327,7 +310,14 @@ class IntimacyAnalyseUploadPage
|
|
|
Widget _buildContent() {
|
|
|
return Expanded(
|
|
|
child: SingleChildScrollView(
|
|
|
- child: Column(children: [_buildUploadCard()]),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ // 上传卡片
|
|
|
+ _buildUploadStepCard(),
|
|
|
+ // 预测方向卡片
|
|
|
+ _buildPredictionDirectionStepCard(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
);
|
|
|
}
|