item_estate.dart 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import 'package:cs_resources/generated/l10n.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 EstateItem extends StatelessWidget {
  8. final int childIndex; //组内的索引
  9. final String item;
  10. final VoidCallback deleteAction;
  11. const EstateItem({
  12. required this.childIndex,
  13. required this.item,
  14. required this.deleteAction,
  15. });
  16. @override
  17. Widget build(BuildContext context) {
  18. return Container(
  19. width: double.infinity,
  20. color: context.appColors.whiteBG,
  21. margin: EdgeInsets.only(top: childIndex == 0 ? 0 : 10),
  22. padding: const EdgeInsets.only(top: 22.5),
  23. child: Column(
  24. children: [
  25. Row(
  26. children: [
  27. MyLoadImage(
  28. "https://img1.baidu.com/it/u=1656098746,3560654086&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
  29. width: 65,
  30. height: 65,
  31. isCircle: true,
  32. ).marginOnly(right: 17, left: 15),
  33. Column(
  34. crossAxisAlignment: CrossAxisAlignment.start,
  35. children: [
  36. //标题
  37. Row(
  38. mainAxisSize: MainAxisSize.max,
  39. crossAxisAlignment: CrossAxisAlignment.center,
  40. children: [
  41. //姓名
  42. MyTextView(
  43. "Wu Bing Bing",
  44. fontSize: 16,
  45. isFontBold: true,
  46. textColor: context.appColors.textBlack,
  47. maxLines: 2,
  48. ).expanded(),
  49. //删除
  50. MyTextView(
  51. S.current.remove,
  52. marginRight: 15,
  53. fontSize: 16,
  54. onClick: deleteAction,
  55. isFontMedium: true,
  56. textColor: context.appColors.deleteRed,
  57. ),
  58. ],
  59. ),
  60. MyTextView(
  61. "Owner",
  62. fontSize: 15,
  63. isFontRegular: true,
  64. textColor: context.appColors.textBlack,
  65. ),
  66. MyTextView(
  67. "Block 35 #08-29",
  68. fontSize: 15,
  69. isFontRegular: true,
  70. textColor: context.appColors.textBlack,
  71. ),
  72. ],
  73. ).expanded(),
  74. ],
  75. ),
  76. const SizedBox(height: 22.5),
  77. Divider(
  78. height: 0.5,
  79. color: context.appColors.backgroundDark,
  80. ),
  81. Center(
  82. child: MyTextView(
  83. S.current.active,
  84. paddingTop: 16,
  85. paddingBottom: 16,
  86. fontSize: 16,
  87. isFontMedium: true,
  88. textColor: context.appColors.textPrimary,
  89. ),
  90. )
  91. ],
  92. ),
  93. );
  94. }
  95. }