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 Row(
  15. crossAxisAlignment: CrossAxisAlignment.center,
  16. mainAxisAlignment: MainAxisAlignment.start,
  17. children: [
  18. MyLoadImage(
  19. news?.coverImage,
  20. width: 80,
  21. height: 80,
  22. ),
  23. MyTextView(
  24. news?.title ?? "",
  25. fontSize: 15,
  26. marginLeft: 12.5,
  27. marginRight: 12.5,
  28. maxLines: 4,
  29. textColor: context.appColors.textBlack,
  30. isFontMedium: 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: 80, width: 270);
  48. }
  49. }