OrderListCard.dart 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. class OrderListCard extends StatelessWidget {
  4. const OrderListCard({Key? key}) : super(key: key);
  5. @override
  6. Widget build(BuildContext context) {
  7. return Container(
  8. width: 375.w,
  9. height: 345.h,
  10. margin: EdgeInsets.fromLTRB(0, 0, 0, 20),
  11. decoration: const BoxDecoration(color: Colors.white, boxShadow: [
  12. BoxShadow(
  13. color: Colors.black12,
  14. offset: Offset(0.0, 15.0), //阴影xy轴偏移量
  15. blurRadius: 15.0, //阴影模糊程度
  16. spreadRadius: 1.0 //阴影扩散程度
  17. )
  18. ]),
  19. child: Row(
  20. crossAxisAlignment: CrossAxisAlignment.start,
  21. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  22. children: [
  23. Container(
  24. margin: EdgeInsets.fromLTRB(15, 20, 15, 0),
  25. width: 18.0,
  26. height: 275.h,
  27. child: Image(
  28. image: AssetImage('images/ordersLeft.png'),
  29. ),
  30. ),
  31. Expanded(
  32. child: Column(
  33. crossAxisAlignment: CrossAxisAlignment.start,
  34. children: [
  35. Container(
  36. width: 320.w,
  37. margin: EdgeInsets.fromLTRB(0, 10, 0, 15),
  38. padding: EdgeInsets.fromLTRB(0, 0, 0, 20),
  39. decoration: const BoxDecoration(
  40. border: Border(
  41. bottom:
  42. BorderSide(width: 0.5, color: Color(0x20000000)
  43. // 0x17000000
  44. ))),
  45. child: Row(
  46. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  47. children: [
  48. Container(
  49. child: RichText(
  50. text: const TextSpan(children: <InlineSpan>[
  51. TextSpan(
  52. text: '订单编号:',
  53. style: TextStyle(
  54. color: Color(0xff666666),
  55. fontSize: 16,
  56. fontWeight: FontWeight.bold)),
  57. TextSpan(
  58. text: 'XUHUI12345',
  59. style: TextStyle(
  60. color: Color(0xff222222),
  61. fontSize: 16,
  62. fontWeight: FontWeight.bold)),
  63. ]),
  64. ),
  65. ),
  66. GestureDetector(
  67. child: const Text('详情 >>',
  68. style: TextStyle(
  69. color: Color(0xff222222),
  70. fontSize: 16,
  71. fontWeight: FontWeight.bold,
  72. )),
  73. onTap: () {
  74. print('进入详情');
  75. },
  76. )
  77. ],
  78. ),
  79. ),
  80. Expanded(
  81. child: Column(
  82. crossAxisAlignment: CrossAxisAlignment.start,
  83. children: [
  84. Padding(
  85. padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
  86. child: RichText(
  87. text: const TextSpan(children: <InlineSpan>[
  88. TextSpan(
  89. text: '农机名称:',
  90. style: TextStyle(
  91. color: Color(0xff666666),
  92. fontSize: 16,
  93. fontWeight: FontWeight.bold)),
  94. TextSpan(
  95. text: '老李家收割机MVGV-005',
  96. style: TextStyle(
  97. color: Color(0xff222222),
  98. fontSize: 16,
  99. fontWeight: FontWeight.bold)),
  100. ]),
  101. ),
  102. ),
  103. Padding(
  104. padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
  105. child: RichText(
  106. text: const TextSpan(children: <InlineSpan>[
  107. TextSpan(
  108. text: '作业面积:',
  109. style: TextStyle(
  110. color: Color(0xff666666),
  111. fontSize: 16,
  112. fontWeight: FontWeight.bold)),
  113. TextSpan(
  114. text: '2辆',
  115. style: TextStyle(
  116. color: Color(0xff222222),
  117. fontSize: 16,
  118. fontWeight: FontWeight.bold)),
  119. ]),
  120. ),
  121. ),
  122. Padding(
  123. padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
  124. child: RichText(
  125. text: const TextSpan(children: <InlineSpan>[
  126. TextSpan(
  127. text: '需求时间:',
  128. style: TextStyle(
  129. color: Color(0xff666666),
  130. fontSize: 16,
  131. fontWeight: FontWeight.bold)),
  132. TextSpan(
  133. text: '2018-08-21',
  134. style: TextStyle(
  135. color: Color(0xff222222),
  136. fontSize: 16,
  137. fontWeight: FontWeight.bold)),
  138. ]),
  139. ),
  140. ),
  141. Padding(
  142. padding: EdgeInsets.fromLTRB(0, 0, 0, 4),
  143. child: RichText(
  144. text: const TextSpan(children: <InlineSpan>[
  145. TextSpan(
  146. text: '下单时间:',
  147. style: TextStyle(
  148. color: Color(0xff666666),
  149. fontSize: 16,
  150. fontWeight: FontWeight.bold)),
  151. TextSpan(
  152. text: '2022-04-13',
  153. style: TextStyle(
  154. color: Color(0xff222222),
  155. fontSize: 16,
  156. fontWeight: FontWeight.bold)),
  157. ]),
  158. ),
  159. ),
  160. ],
  161. )),
  162. Container(
  163. margin: EdgeInsets.fromLTRB(0, 0, 0, 30),
  164. padding: EdgeInsets.fromLTRB(0, 20, 0, 0),
  165. decoration: const BoxDecoration(
  166. border: Border(
  167. top: BorderSide(
  168. width: 0.5, color: Color(0x20000000)))),
  169. width: 320.w,
  170. child: Row(
  171. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  172. children: [
  173. RichText(
  174. text: const TextSpan(children: <InlineSpan>[
  175. TextSpan(
  176. text: '订单状态:',
  177. style: TextStyle(
  178. color: Color(0xff666666),
  179. fontSize: 16,
  180. fontWeight: FontWeight.bold)),
  181. TextSpan(
  182. text: '待付款',
  183. style: TextStyle(
  184. color: Color(0xff51D4FF),
  185. fontSize: 16,
  186. fontWeight: FontWeight.bold)),
  187. ]),
  188. ),
  189. RichText(
  190. text: const TextSpan(children: <InlineSpan>[
  191. TextSpan(
  192. text: '费用:',
  193. style: TextStyle(
  194. color: Color(0xff666666),
  195. fontSize: 16,
  196. fontWeight: FontWeight.bold)),
  197. TextSpan(
  198. text: '850元',
  199. style: TextStyle(
  200. color: Color(0xffB61515),
  201. fontSize: 16,
  202. fontWeight: FontWeight.bold)),
  203. ]),
  204. ),
  205. ],
  206. ),
  207. ),
  208. ],
  209. ),
  210. ),
  211. ],
  212. ),
  213. );
  214. }
  215. }