OrderListCard.dart 9.2KB

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