item_manage.dart 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. /// Condo的Manage的Item
  9. class ManageItem extends StatelessWidget {
  10. final int index;
  11. final bool item;
  12. final VoidCallback deleteAction;
  13. const ManageItem({
  14. required this.index,
  15. required this.item,
  16. required this.deleteAction,
  17. });
  18. @override
  19. Widget build(BuildContext context) {
  20. return Container(
  21. margin: const EdgeInsets.only(top: 1),
  22. color: context.appColors.whiteBG,
  23. width: double.infinity,
  24. padding: const EdgeInsets.only(left: 20, right: 23, top: 20, bottom: 20),
  25. child: Row(
  26. mainAxisSize: MainAxisSize.max,
  27. crossAxisAlignment: CrossAxisAlignment.center,
  28. children: [
  29. //选中
  30. MyAssetImage(
  31. item ? Assets.baseServiceRadioChecked : Assets.baseServiceRadioUncheck,
  32. width: 25,
  33. height: 25,
  34. ),
  35. MyAssetImage(
  36. Assets.facilityAddCardMaster,
  37. height: 38,
  38. ).marginOnly(left: 9, right: 9),
  39. Column(
  40. crossAxisAlignment: CrossAxisAlignment.start,
  41. children: [
  42. MyTextView(
  43. "Wu Bing Bing's Card",
  44. textColor: context.appColors.textBlack,
  45. fontSize: 13.5,
  46. isFontRegular: true,
  47. ),
  48. MyTextView(
  49. "Ending 9423",
  50. textColor: context.appColors.textBlack,
  51. fontSize: 13.5,
  52. isFontRegular: true,
  53. ),
  54. MyTextView(
  55. item ? S.current.primary_card : S.current.set_primary_card,
  56. textColor: context.appColors.textPrimary,
  57. fontSize: 12,
  58. marginTop: 3,
  59. fontWeight: FontWeight.w600,
  60. ),
  61. ],
  62. ).expanded(),
  63. MyTextView(
  64. S.current.delete,
  65. textColor: Colors.white,
  66. backgroundColor: context.appColors.orangeBG,
  67. cornerRadius: 7,
  68. marginLeft: 9,
  69. paddingTop: 9,
  70. onClick: deleteAction,
  71. marginTop: 15,
  72. paddingBottom: 9,
  73. textAlign: TextAlign.center,
  74. boxWidth: 60,
  75. )
  76. ],
  77. ),
  78. );
  79. }
  80. }