item_estate.dart 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import 'package:cs_resources/generated/assets.dart';
  2. import 'package:cs_resources/generated/l10n.dart';
  3. import 'package:cs_resources/theme/app_colors_theme.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:widgets/ext/ex_widget.dart';
  6. import 'package:widgets/my_load_image.dart';
  7. import 'package:widgets/my_text_view.dart';
  8. class EstateItem extends StatelessWidget {
  9. final int childIndex; //组内的索引
  10. final String item;
  11. final VoidCallback deleteAction;
  12. const EstateItem({
  13. required this.childIndex,
  14. required this.item,
  15. required this.deleteAction,
  16. });
  17. @override
  18. Widget build(BuildContext context) {
  19. return Stack(
  20. children: [
  21. Container(
  22. width: double.infinity,
  23. color: context.appColors.whiteBG,
  24. padding: const EdgeInsets.only(top: 22.5),
  25. margin: EdgeInsets.only(top: childIndex == 0 ? 0 : 10),
  26. child: Column(
  27. children: [
  28. Row(
  29. children: [
  30. MyLoadImage(
  31. "https://img1.baidu.com/it/u=1656098746,3560654086&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
  32. width: 65,
  33. height: 65,
  34. isCircle: true,
  35. ).marginOnly(
  36. right: 17,
  37. left: 15,
  38. ),
  39. Column(
  40. crossAxisAlignment: CrossAxisAlignment.start,
  41. children: [
  42. const SizedBox(height: 22.5),
  43. //姓名
  44. MyTextView(
  45. "Wu Bing Bing",
  46. fontSize: 16,
  47. isFontBold: true,
  48. textColor: context.appColors.textBlack,
  49. maxLines: 2,
  50. ),
  51. MyTextView(
  52. "Owner",
  53. fontSize: 15,
  54. isFontRegular: true,
  55. textColor: context.appColors.textBlack,
  56. ),
  57. MyTextView(
  58. "Block 35 #08-29",
  59. fontSize: 15,
  60. isFontRegular: true,
  61. textColor: context.appColors.textBlack,
  62. ),
  63. ],
  64. ).expanded(),
  65. ],
  66. ),
  67. const SizedBox(height: 22.5),
  68. Divider(
  69. height: 0.5,
  70. color: context.appColors.backgroundDark,
  71. ),
  72. Center(
  73. child: MyTextView(
  74. S.current.remove,
  75. paddingTop: 16,
  76. paddingBottom: 16,
  77. fontSize: 16,
  78. isFontMedium: true,
  79. textColor: context.appColors.textPrimary,
  80. ),
  81. )
  82. ],
  83. ),
  84. ),
  85. Visibility(
  86. visible: true,
  87. child: MyAssetImage(
  88. Assets.profileMyEstateDefault,
  89. width: 76,
  90. height: 44,
  91. ),
  92. ).marginOnly(top: childIndex == 0 ? 0 : 10).alignRight(),
  93. MyTextView(
  94. S.current.approved,
  95. fontSize: 16,
  96. onClick: deleteAction,
  97. isFontMedium: true,
  98. textColor: context.appColors.textGreen,
  99. ).marginOnly(top: childIndex == 0 ? 46.5 : 56.5, right: 15).alignRight()
  100. ],
  101. );
  102. }
  103. }