item_home_manage_guide.dart 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import 'package:cpt_main/modules/feedback/feedback_page.dart';
  2. import 'package:cs_resources/theme/app_colors_theme.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:widgets/ext/ex_widget.dart';
  5. import 'package:widgets/my_load_image.dart';
  6. import 'package:widgets/my_text_view.dart';
  7. class ManageGuideItem extends StatelessWidget {
  8. final Map<String, dynamic> manageGuide;
  9. ManageGuideItem({required this.manageGuide});
  10. @override
  11. Widget build(BuildContext context) {
  12. return Column(
  13. crossAxisAlignment: CrossAxisAlignment.start,
  14. mainAxisAlignment: MainAxisAlignment.start,
  15. children: [
  16. MyAssetImage(
  17. manageGuide['category_icon'],
  18. width: (manageGuide['icon_width'] as num).toDouble(),
  19. height: (manageGuide['icon_height'] as num).toDouble(),
  20. fit: BoxFit.cover, // 调整 fit 参数
  21. ).marginOnly(top: manageGuide['margin_top']),
  22. MyTextView(
  23. manageGuide['category_name'],
  24. marginLeft: 9,
  25. marginTop: 10,
  26. maxLines: 2,
  27. fontSize: 14,
  28. isFontMedium: true,
  29. textColor: context.appColors.tabTextUnSelectedPrimary,
  30. ),
  31. ],
  32. // ),
  33. )
  34. .decorated(
  35. color: context.appColors.lightBlueBg,
  36. borderRadius: BorderRadius.circular(5.0), // 5个圆角
  37. boxShadow: [
  38. BoxShadow(
  39. color: const Color(0xFF656565).withOpacity(0.1), // 阴影颜色,并且设置透明度
  40. offset: const Offset(0, 1.5), // 阴影的偏移量
  41. blurRadius: 2.5, // 模糊半径
  42. spreadRadius: 1.5, // 扩散半径
  43. ),
  44. ],
  45. )
  46. .marginOnly(right: 10)
  47. .constrained(width: 130, height: 142.5);
  48. }
  49. }