item_visitor.dart 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import 'package:cpt_main/modules/demo_page.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_text_view.dart';
  6. class VisitorItem extends StatelessWidget {
  7. final int index;
  8. final String item;
  9. const VisitorItem({
  10. required this.index,
  11. required this.item,
  12. });
  13. @override
  14. Widget build(BuildContext context) {
  15. return Container(
  16. margin: const EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
  17. padding: const EdgeInsets.symmetric(vertical: 19, horizontal: 18.5),
  18. decoration: BoxDecoration(
  19. color: context.appColors.whiteBG,
  20. borderRadius: BorderRadius.circular(6.0), // 圆角
  21. boxShadow: [
  22. BoxShadow(
  23. color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
  24. offset: const Offset(0, 3), // 阴影的偏移量
  25. blurRadius: 8.0, // 模糊半径
  26. spreadRadius: 3.0, // 扩散半径
  27. ),
  28. ],
  29. ),
  30. child: Column(
  31. crossAxisAlignment: CrossAxisAlignment.start,
  32. children: [
  33. //姓名
  34. MyTextView(
  35. "Wu Bing Bing",
  36. fontSize: 16,
  37. marginTop: 19,
  38. marginBottom: 5,
  39. textColor: context.appColors.textBlack,
  40. isFontMedium: true,
  41. ),
  42. //电话/身份证
  43. Row(
  44. children: [
  45. MyTextView(
  46. "+86 12345678901",
  47. fontSize: 14,
  48. textColor: context.appColors.textBlack,
  49. isFontRegular: true,
  50. ),
  51. const Spacer(),
  52. MyTextView(
  53. "M12****7B",
  54. fontSize: 14,
  55. textColor: context.appColors.textBlack,
  56. isFontRegular: true,
  57. ),
  58. ],
  59. ),
  60. //车牌号/访问日期
  61. Row(
  62. children: [
  63. MyTextView(
  64. "EFG8878",
  65. fontSize: 14,
  66. textColor: context.appColors.textBlack,
  67. isFontRegular: true,
  68. ),
  69. const Spacer(),
  70. MyTextView(
  71. "Monday 13 Oct 2024",
  72. fontSize: 14,
  73. textColor: context.appColors.textBlack,
  74. isFontRegular: true,
  75. ),
  76. ],
  77. ).marginOnly(top: 5),
  78. //备注
  79. MyTextView(
  80. "Visiting a friend's house as a guest",
  81. fontSize: 14,
  82. marginTop: 6,
  83. textColor: context.appColors.textDarkGray,
  84. isFontRegular: true,
  85. fontWeight: FontWeight.w500,
  86. ),
  87. ],
  88. ),
  89. );
  90. }
  91. }