OrderListCard.dart 10KB

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