item_facility_active.dart 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import 'package:cpt_facility/modules/facility/active/facility_active_screen.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_text_view.dart';
  7. /// 设施的Active的Item
  8. class FacilityActiveItem extends StatelessWidget {
  9. final int index;
  10. final String item;
  11. const FacilityActiveItem({
  12. required this.index,
  13. required this.item,
  14. });
  15. @override
  16. Widget build(BuildContext context) {
  17. return Container(
  18. width: double.infinity,
  19. margin: const EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
  20. padding: const EdgeInsets.only(left: 20, right: 15, top: 18, bottom: 25),
  21. decoration: BoxDecoration(
  22. color: context.appColors.whiteBG,
  23. borderRadius: BorderRadius.circular(6.0), // 圆角
  24. ),
  25. child: Row(
  26. mainAxisSize: MainAxisSize.max,
  27. crossAxisAlignment: CrossAxisAlignment.start,
  28. children: [
  29. Column(
  30. crossAxisAlignment: CrossAxisAlignment.start,
  31. children: [
  32. //设施
  33. MyTextView(
  34. "Kids party room",
  35. fontSize: 16,
  36. maxLines: 3,
  37. textColor: context.appColors.textBlack,
  38. isFontMedium: true,
  39. ),
  40. //分类
  41. MyTextView(
  42. "Blue room",
  43. fontSize: 14,
  44. marginTop: 3,
  45. textColor: context.appColors.textBlack,
  46. isFontRegular: true,
  47. ),
  48. //预订人
  49. MyTextView(
  50. S.current.booked_by_someone("Wu Bing Bing"),
  51. fontSize: 14,
  52. marginTop: 3,
  53. textColor: context.appColors.textBlack,
  54. isFontRegular: true,
  55. ),
  56. //日期
  57. MyTextView(
  58. "Tue,24 Oct 2023",
  59. fontSize: 14,
  60. marginTop: 16,
  61. textColor: context.appColors.textBlack,
  62. isFontRegular: true,
  63. ),
  64. //时间
  65. MyTextView(
  66. "05:00 PM-10:00 PM",
  67. fontSize: 14,
  68. marginBottom: 7,
  69. marginTop: 3,
  70. textColor: context.appColors.textBlack,
  71. isFontRegular: true,
  72. ),
  73. //标签
  74. Row(
  75. children: [
  76. MyTextView(
  77. "Fee Paid",
  78. textColor: context.appColors.textPrimary,
  79. fontSize: 13,
  80. isFontRegular: true,
  81. backgroundColor: context.appColors.lightPurpleBg,
  82. cornerRadius: 3,
  83. paddingLeft: 7,
  84. marginRight: 6,
  85. paddingRight: 7,
  86. paddingTop: 3,
  87. paddingBottom: 3,
  88. ),
  89. MyTextView(
  90. "Deposit",
  91. textColor: context.appColors.textPrimary,
  92. fontSize: 13,
  93. isFontRegular: true,
  94. backgroundColor: context.appColors.lightPurpleBg,
  95. cornerRadius: 3,
  96. paddingLeft: 7,
  97. marginRight: 6,
  98. paddingRight: 7,
  99. paddingTop: 3,
  100. paddingBottom: 3,
  101. )
  102. ],
  103. )
  104. ],
  105. ).expanded(),
  106. Column(
  107. mainAxisSize: MainAxisSize.min,
  108. mainAxisAlignment:MainAxisAlignment.start,
  109. crossAxisAlignment: CrossAxisAlignment.start,
  110. children: [
  111. //查看按钮
  112. MyTextView(
  113. S.current.view,
  114. textColor: Colors.white,
  115. backgroundColor: context.appColors.btnBgDefault,
  116. cornerRadius: 7,
  117. paddingTop: 9,
  118. paddingBottom: 9,
  119. textAlign: TextAlign.center,
  120. boxWidth: 60,
  121. )
  122. ],
  123. )
  124. ],
  125. ),
  126. );
  127. }
  128. }