upload_step_card.dart 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import '../../../../resource/assets.gen.dart';
  4. import '../../../../resource/colors.gen.dart';
  5. import '../../intimacy_analyse_upload/widget/upload_nine_grid.dart';
  6. import '../step_card.dart';
  7. /// 上传步骤卡片
  8. class UploadStepCard extends StatelessWidget {
  9. /// 步骤标签
  10. final String? stepLabel;
  11. /// 步骤标题
  12. final String? stepTitle;
  13. /// 步骤描述
  14. final String? stepDesc;
  15. /// 底部的子组件,可以没有
  16. final Widget? bottomChild;
  17. const UploadStepCard({
  18. super.key,
  19. this.stepLabel,
  20. required this.stepTitle,
  21. required this.stepDesc,
  22. this.bottomChild,
  23. });
  24. @override
  25. Widget build(BuildContext context) {
  26. return StepCard(
  27. bgImageProvider: Assets.images.bgIntimacyAnalyseUploadCard.provider(),
  28. stepLabel: stepLabel,
  29. stepTitle: stepTitle,
  30. stepDesc: stepDesc,
  31. // 顶部的图标
  32. topIconWidget: Assets.images.iconIntimacyAnalyseUploadTop.image(
  33. height: 63.h,
  34. width: 103.w,
  35. ),
  36. contentWidget: Column(
  37. children: [
  38. // 图片九宫格
  39. Container(
  40. margin: EdgeInsets.only(left: 12.w, right: 12.w),
  41. padding: EdgeInsets.only(
  42. left: 12.w,
  43. top: 12.h,
  44. right: 12.w,
  45. bottom: 12.h,
  46. ),
  47. decoration: BoxDecoration(
  48. color: ColorName.white,
  49. borderRadius: BorderRadius.circular(16.r),
  50. ),
  51. // 图片九宫格
  52. child: UploadNineGrid(
  53. mode: Mode.edit,
  54. imageSrcList: ["", "", "", "", "", "", ""],
  55. maxCount: 9,
  56. spacing: 8.0,
  57. ),
  58. ),
  59. SizedBox(height: 10.h),
  60. // 当前的亲密关系
  61. bottomChild ?? SizedBox(),
  62. ],
  63. ),
  64. );
  65. }
  66. }