item_home_property_news.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import 'package:cpt_main/modules/feedback/feedback_page.dart';
  2. import 'package:cs_resources/theme/app_colors_theme.dart';
  3. import 'package:domain/entity/home_list_entity.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:shared/utils/util.dart';
  6. import 'package:widgets/ext/ex_widget.dart';
  7. import 'package:widgets/my_load_image.dart';
  8. import 'package:widgets/my_text_view.dart';
  9. class PropertyNews extends StatelessWidget {
  10. final HomeListPropertyNews? news;
  11. PropertyNews({required this.news});
  12. @override
  13. Widget build(BuildContext context) {
  14. return Column(
  15. crossAxisAlignment: CrossAxisAlignment.start,
  16. children: [
  17. MyLoadImage(
  18. news?.coverImage,
  19. width: 164.5,
  20. height: 105,
  21. ),
  22. MyTextView(
  23. news?.title ?? "",
  24. fontSize: 14,
  25. marginLeft: 14,
  26. marginRight: 14,
  27. marginTop: 15.5,
  28. maxLines: 4,
  29. textColor: context.appColors.textBlack,
  30. isFontRegular: true,
  31. ).expanded(),
  32. ],
  33. )
  34. .decorated(
  35. color: context.appColors.whiteBG,
  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(height: 202.5, width: 165);
  48. }
  49. }