OrderListCard.dart 8.9KB

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