OrderInfoCard.dart 9.5KB

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