item_estate.dart 3.0 KB

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