import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../../../../resource/assets.gen.dart'; import '../../../../resource/colors.gen.dart'; import '../../intimacy_analyse_upload/widget/upload_nine_grid.dart'; import '../step_card.dart'; /// 上传步骤卡片 class UploadStepCard extends StatelessWidget { /// 步骤标签 final String? stepLabel; /// 步骤标题 final String? stepTitle; /// 步骤描述 final String? stepDesc; /// 底部的子组件,可以没有 final Widget? bottomChild; const UploadStepCard({ super.key, this.stepLabel, required this.stepTitle, required this.stepDesc, this.bottomChild, }); @override Widget build(BuildContext context) { return StepCard( bgImageProvider: Assets.images.bgIntimacyAnalyseUploadCard.provider(), stepLabel: stepLabel, stepTitle: stepTitle, stepDesc: stepDesc, // 顶部的图标 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), // 当前的亲密关系 bottomChild ?? SizedBox(), ], ), ); } }