recommend_exit.dart 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import 'package:liftmanager/res/resources.dart';
  4. import 'package:liftmanager/widgets/app_bar.dart';
  5. import 'package:liftmanager/widgets/load_image.dart';
  6. class RecommendExit extends StatefulWidget {
  7. RecommendExit(this.id);
  8. final String id;
  9. @override
  10. State<StatefulWidget> createState() {
  11. return RecommendExitState();
  12. }
  13. }
  14. class RecommendExitState extends State<RecommendExit> {
  15. // NewsDetailItem item = NewsDetailItem();
  16. ScrollController _scrollController = new ScrollController();
  17. @override
  18. Widget build(BuildContext context) {
  19. double width = MediaQuery.of(context).size.width;
  20. return Scaffold(
  21. resizeToAvoidBottomPadding: false,//不让键盘弹上去
  22. appBar: MyAppBar(
  23. centerTitle: "出诊推荐",
  24. ),
  25. body:Stack(
  26. children:<Widget>[
  27. Container(
  28. padding: EdgeInsets.only(bottom:ScreenUtil().setWidth(70)),
  29. child: ListView(
  30. children: <Widget>[
  31. Column(
  32. crossAxisAlignment: CrossAxisAlignment.start,
  33. children: <Widget>[
  34. Container(
  35. padding: EdgeInsets.only(left:ScreenUtil().setWidth(15),right:ScreenUtil().setWidth(15),top:ScreenUtil().setWidth(10),bottom:ScreenUtil().setWidth(10)),
  36. decoration: BoxDecoration(
  37. border: Border(
  38. bottom: BorderSide(width: 0.5, color: Colours.line),
  39. ),
  40. ),
  41. child: Row(
  42. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  43. children:<Widget>[
  44. Text(
  45. "提问人",
  46. style: TextStyle(
  47. color:Color(0xff333333),
  48. fontSize:ScreenUtil().setSp(17)
  49. ),
  50. textAlign:TextAlign.start,
  51. ),
  52. Row(
  53. children: <Widget>[
  54. Text(
  55. "小小维修工",
  56. style: TextStyle(
  57. color:Color(0xff666666),
  58. fontSize:ScreenUtil().setSp(15)
  59. ),
  60. textAlign:TextAlign.start,
  61. ),
  62. Container(
  63. margin: EdgeInsets.only(left:ScreenUtil().setWidth(10),right:ScreenUtil().setWidth(10),top:ScreenUtil().setWidth(5)),
  64. decoration: BoxDecoration(
  65. borderRadius: BorderRadius.circular(ScreenUtil().setWidth(25)),
  66. ),
  67. child: LoadAssetImage(
  68. // image: AssetImage(i['img']),
  69. "temporary/avator1",
  70. width: ScreenUtil().setWidth(37),
  71. height:ScreenUtil().setWidth(37),
  72. // alignment: Alignment.centerLeft,
  73. ),
  74. ),
  75. ],
  76. )
  77. ]
  78. ),
  79. ),
  80. Container(
  81. padding: EdgeInsets.only(left:ScreenUtil().setWidth(15),right:ScreenUtil().setWidth(15),top:ScreenUtil().setWidth(10),bottom:ScreenUtil().setWidth(10)),
  82. decoration: BoxDecoration(
  83. border: Border(
  84. bottom: BorderSide(width: 0.5, color: Colours.line),
  85. ),
  86. ),
  87. child: Row(
  88. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  89. children:<Widget>[
  90. Text(
  91. "电梯品牌",
  92. style: TextStyle(
  93. color:Color(0xff333333),
  94. fontSize:ScreenUtil().setSp(17)
  95. ),
  96. textAlign:TextAlign.start,
  97. ),
  98. Text(
  99. "奥的斯",
  100. style: TextStyle(
  101. color:Color(0xff666666),
  102. fontSize:ScreenUtil().setSp(15)
  103. ),
  104. textAlign:TextAlign.start,
  105. ),
  106. ]
  107. ),
  108. ),
  109. Container(
  110. padding: EdgeInsets.only(left:ScreenUtil().setWidth(15),right:ScreenUtil().setWidth(15),top:ScreenUtil().setWidth(10),bottom:ScreenUtil().setWidth(10)),
  111. decoration: BoxDecoration(
  112. border: Border(
  113. bottom: BorderSide(width: 0.5, color: Colours.line),
  114. ),
  115. ),
  116. child: Row(
  117. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  118. children:<Widget>[
  119. Text(
  120. "出诊时间",
  121. style: TextStyle(
  122. color:Color(0xff333333),
  123. fontSize:ScreenUtil().setSp(17)
  124. ),
  125. textAlign:TextAlign.start,
  126. ),
  127. Text(
  128. "2020-02-20 12:30",
  129. style: TextStyle(
  130. color:Color(0xff666666),
  131. fontSize:ScreenUtil().setSp(15)
  132. ),
  133. textAlign:TextAlign.start,
  134. ),
  135. ]
  136. ),
  137. ),
  138. Container(
  139. padding: EdgeInsets.only(left:ScreenUtil().setWidth(15),right:ScreenUtil().setWidth(15),top:ScreenUtil().setWidth(10),bottom:ScreenUtil().setWidth(10)),
  140. decoration: BoxDecoration(
  141. border: Border(
  142. bottom: BorderSide(width: 0.5, color: Colours.line),
  143. ),
  144. ),
  145. child: Row(
  146. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  147. children:<Widget>[
  148. Text(
  149. "出诊地点",
  150. style: TextStyle(
  151. color:Color(0xff333333),
  152. fontSize:ScreenUtil().setSp(17)
  153. ),
  154. textAlign:TextAlign.start,
  155. ),
  156. Text(
  157. "创业大厦E座",
  158. style: TextStyle(
  159. color:Color(0xff666666),
  160. fontSize:ScreenUtil().setSp(15)
  161. ),
  162. textAlign:TextAlign.start,
  163. ),
  164. ]
  165. ),
  166. ),
  167. Column(
  168. crossAxisAlignment: CrossAxisAlignment.start,
  169. mainAxisAlignment: MainAxisAlignment.start,
  170. children: <Widget>[
  171. Container(
  172. padding:EdgeInsets.only(left:ScreenUtil().setWidth(15),top:ScreenUtil().setWidth(10),bottom:ScreenUtil().setWidth(5)),
  173. child: Text(
  174. "问题描述",
  175. style: TextStyle(
  176. color:Color(0xff333333),
  177. fontSize:ScreenUtil().setSp(17),
  178. ),
  179. textAlign:TextAlign.left,
  180. ),
  181. ),
  182. Container(
  183. padding: EdgeInsets.only(left:ScreenUtil().setWidth(15),right:ScreenUtil().setWidth(15),bottom:ScreenUtil().setWidth(50)),
  184. child: Text(
  185. "重启闸门,还是没有解决",
  186. style: TextStyle(
  187. color:Color(0xff666666),
  188. fontSize:ScreenUtil().setSp(15),
  189. ),
  190. textAlign:TextAlign.left,
  191. ),
  192. ),
  193. ],
  194. ),
  195. SizedBox(
  196. height:6,
  197. child: Container(
  198. color:Color(0xFFF8F8F8)
  199. ),
  200. ),
  201. Column(
  202. crossAxisAlignment: CrossAxisAlignment.start,
  203. mainAxisAlignment: MainAxisAlignment.start,
  204. children: <Widget>[
  205. Container(
  206. padding:EdgeInsets.only(left:ScreenUtil().setWidth(15),top:ScreenUtil().setWidth(10),bottom:ScreenUtil().setWidth(5)),
  207. child: Text(
  208. "已尝试方法",
  209. style: TextStyle(
  210. color:Color(0xff333333),
  211. fontSize:ScreenUtil().setSp(17),
  212. ),
  213. textAlign:TextAlign.left,
  214. ),
  215. ),
  216. Container(
  217. padding: EdgeInsets.only(left:ScreenUtil().setWidth(15),right:ScreenUtil().setWidth(15),bottom:ScreenUtil().setWidth(50)),
  218. child: Text(
  219. "重启闸门,还是没有解决",
  220. style: TextStyle(
  221. color:Color(0xff666666),
  222. fontSize:ScreenUtil().setSp(15),
  223. ),
  224. textAlign:TextAlign.left,
  225. ),
  226. ),
  227. ],
  228. ),
  229. SizedBox(
  230. height:6,
  231. child: Container(
  232. color:Color(0xFFF8F8F8)
  233. ),
  234. ),
  235. Container(
  236. padding: EdgeInsets.all(15),
  237. color: Colors.white,
  238. child: Wrap(
  239. spacing: 15,
  240. runSpacing : 15,
  241. children:<Widget>[
  242. LoadAssetImage(
  243. "temporary/product1",
  244. width: ScreenUtil().setWidth(70),
  245. height:ScreenUtil().setWidth(70),
  246. // alignment: Alignment.centerLeft,
  247. ),
  248. LoadAssetImage(
  249. "temporary/product1",
  250. width: ScreenUtil().setWidth(70),
  251. height:ScreenUtil().setWidth(70),
  252. // alignment: Alignment.centerLeft,
  253. ),
  254. LoadAssetImage(
  255. "temporary/product1",
  256. width: ScreenUtil().setWidth(70),
  257. height:ScreenUtil().setWidth(70),
  258. // alignment: Alignment.centerLeft,
  259. ),
  260. LoadAssetImage(
  261. "temporary/product1",
  262. width: ScreenUtil().setWidth(70),
  263. height:ScreenUtil().setWidth(70),
  264. // alignment: Alignment.centerLeft,
  265. ),
  266. LoadAssetImage(
  267. "temporary/product1",
  268. width: ScreenUtil().setWidth(70),
  269. height:ScreenUtil().setWidth(70),
  270. // alignment: Alignment.centerLeft,
  271. ),
  272. LoadAssetImage(
  273. "temporary/product1",
  274. width: ScreenUtil().setWidth(70),
  275. height:ScreenUtil().setWidth(70),
  276. // alignment: Alignment.centerLeft,
  277. ),
  278. LoadAssetImage(
  279. "temporary/product1",
  280. width: ScreenUtil().setWidth(70),
  281. height:ScreenUtil().setWidth(70),
  282. // alignment: Alignment.centerLeft,
  283. ),
  284. LoadAssetImage(
  285. "temporary/product1",
  286. width: ScreenUtil().setWidth(70),
  287. height:ScreenUtil().setWidth(70),
  288. // alignment: Alignment.centerLeft,
  289. ),
  290. ]
  291. )
  292. ),
  293. ],
  294. ),
  295. ]
  296. )
  297. ),
  298. Positioned(
  299. bottom:0,
  300. left:0,
  301. child:Container(
  302. width: width,
  303. child: Row(
  304. children:<Widget>[
  305. Container(
  306. height:ScreenUtil().setWidth(70),
  307. width:width/2,
  308. color: Colors.white,
  309. child: FlatButton(
  310. // padding: EdgeInsets.all(15.0),
  311. child: Text("拒绝",style: TextStyle(fontSize:ScreenUtil().setSp(16)),),
  312. textColor: Color(0xff222222),
  313. onPressed: () {
  314. // NavigatorUtils.push(context, BbsRouter.questionPay);
  315. },
  316. ),
  317. ),
  318. Container(
  319. height:ScreenUtil().setWidth(70),
  320. width:width/2,
  321. color: Color(0xff0388FD),
  322. child: FlatButton(
  323. // padding: EdgeInsets.all(15.0),
  324. child: Text("接单",style: TextStyle(fontSize:ScreenUtil().setSp(16)),),
  325. textColor: Colors.white,
  326. onPressed: () {
  327. // NavigatorUtils.push(context, BbsRouter.questionPay);
  328. },
  329. ),
  330. ),
  331. ]
  332. )
  333. )
  334. )
  335. ]
  336. )
  337. );
  338. }
  339. }