order_detail_page.dart 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import 'package:flutter_picker/flutter_picker.dart';
  4. import '../../util/api.dart';
  5. import '../../util/models.dart';
  6. import '../../util/util.dart';
  7. import '../../showAlert.dart';
  8. import '../../showLineModal.dart';
  9. import '../../util/session.dart';
  10. import '../../util/bluetooth_utils.dart';
  11. class OrderDetailPage extends StatefulWidget {
  12. final String orderNo;
  13. final String status;
  14. OrderDetailPage({
  15. Key key,
  16. @required this.orderNo,
  17. @required this.status
  18. }): super(key: key);
  19. _OrderDetailPageState createState() => _OrderDetailPageState();
  20. }
  21. class _OrderDetailPageState extends State < OrderDetailPage > {
  22. OrderDetailData orderDetailObj;
  23. @override
  24. void initState() {
  25. super.initState();
  26. getOrderDetail(widget.orderNo).then((resp) {
  27. if (isNotError(context, resp) && this.mounted) {
  28. OrderDetailObj tempObj = OrderDetailObj.fromJson(resp.data);
  29. setState(() {
  30. orderDetailObj = tempObj.data;
  31. });
  32. }
  33. });
  34. }
  35. @override
  36. Widget build(BuildContext context) {
  37. return Scaffold(
  38. appBar: AppBar(
  39. title: Text(
  40. "订单详情",
  41. style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(36)),
  42. ),
  43. centerTitle: true,
  44. backgroundColor: Color.fromRGBO(64, 98, 254, 1),
  45. ),
  46. body: Container(
  47. padding: EdgeInsets.fromLTRB(
  48. 0,
  49. ScreenUtil.getInstance().setHeight(20),
  50. 0,
  51. ScreenUtil.getInstance().setHeight(20)),
  52. color: Color.fromRGBO(246, 246, 254, 1),
  53. child: orderDetailObj == null ?
  54. Center(
  55. child: _getMoreWidget(),
  56. ) :
  57. ListView(
  58. children: < Widget > [
  59. _sendInfo(),
  60. _getInfo(),
  61. ItemInfoWidget(obj: orderDetailObj, status: widget.status),
  62. ],
  63. )),
  64. //resizeToAvoidBottomPadding: false //键盘弹出,页面不跟随向上滑动,防止出现溢出错误
  65. );
  66. }
  67. Widget _sendInfo() {
  68. return Container(
  69. color: Colors.white,
  70. margin: EdgeInsets.only(bottom: ScreenUtil.getInstance().setHeight(20)),
  71. child: Column(
  72. children: < Widget > [
  73. titleWidget('lib/images/icon_send.png', '发件信息'),
  74. underLine(),
  75. contentWiget(
  76. '电话',
  77. orderDetailObj.senderPhone != null ?
  78. orderDetailObj.senderPhone :
  79. orderDetailObj.sendCompanyPhone),
  80. contentWiget('企业编码', orderDetailObj.sendCompanyCode),
  81. contentWiget('企业名称', orderDetailObj.sendCompanyName),
  82. contentWiget(
  83. '城市/区域',
  84. '${orderDetailObj.sendCompanyProvinceName}' +
  85. ' ' +
  86. '${orderDetailObj.sendCompanyCityName}' +
  87. ' ' +
  88. '${orderDetailObj.sendCompanyAreaName}'),
  89. lastContentWiget('详细地址', orderDetailObj.sendCompanyAddress)
  90. ],
  91. ));
  92. }
  93. Widget _getInfo() {
  94. return Container(
  95. color: Colors.white,
  96. margin: EdgeInsets.only(bottom: ScreenUtil.getInstance().setHeight(20)),
  97. child: Column(
  98. children: < Widget > [
  99. titleWidget('lib/images/icon_shoujian.png', '收件信息'),
  100. underLine(),
  101. contentWiget('企业名称', orderDetailObj.receiptCompanyName),
  102. contentWiget('电话', orderDetailObj.receiptCompanyPhone),
  103. contentWiget(
  104. '城市/区域',
  105. '${orderDetailObj.receiptCompanyProvinceName}' +
  106. ' ' +
  107. '${orderDetailObj.receiptCompanyCityName}' +
  108. ' ' +
  109. '${orderDetailObj.receiptCompanyAreaName}'),
  110. lastContentWiget('详细地址', orderDetailObj.sendCompanyAddress)
  111. ],
  112. ));
  113. }
  114. }
  115. class ItemInfoWidget extends StatefulWidget {
  116. final OrderDetailData obj;
  117. final String status;
  118. ItemInfoWidget({
  119. Key key,
  120. @required this.obj,
  121. @required this.status
  122. }): super(key: key);
  123. _ItemInfoWidgetState createState() => _ItemInfoWidgetState();
  124. }
  125. class _ItemInfoWidgetState extends State < ItemInfoWidget > {
  126. double afterTransportFee = 0.0; //运费
  127. int afterGoodsNumber = 0; //数量
  128. double afterCollectingFee = 0.0; //代收
  129. bool submitStatus = true;
  130. String lineId = '-1';
  131. List < CompanyOfLineList > lineList = [];
  132. String showTextPaymentMehod = '现付';
  133. int goodsPaymentMethod = 1;
  134. BluetoothUtils bluetooth = BluetoothUtils();
  135. bool checkedLine = false;
  136. String stationId;
  137. @override
  138. void initState() {
  139. super.initState();
  140. setState(() {
  141. afterTransportFee = widget.obj.goodsFreight / 100;
  142. afterGoodsNumber = widget.obj.goodsQuantity;
  143. afterCollectingFee = widget.obj.goodsAgencyFund / 100;
  144. lineId = widget.obj.lineId.toString();
  145. });
  146. if(afterTransportFee<=0){
  147. getKey('defaultFreightPrice').then((resp){
  148. afterTransportFee = int.parse(resp)/100;
  149. });
  150. }
  151. getKey('stationId').then((resp){
  152. stationId = resp;
  153. });
  154. if (widget.obj.receiptCompanyId != null) {
  155. getLineOfCompanyId(widget.obj.receiptCompanyId.toString()).then((resp) {
  156. if (isNotError(context, resp) && this.mounted) {
  157. CompanyOfLine obj = CompanyOfLine.fromJson(resp.data);
  158. setState(() {
  159. lineList = obj.data;
  160. });
  161. }
  162. });
  163. }
  164. showTextPaymentMehod = widget.obj.goodsPaymentMethod == 1 ? '现付' : '到付';
  165. goodsPaymentMethod = widget.obj.goodsPaymentMethod;
  166. }
  167. @override
  168. Widget build(BuildContext context) {
  169. return Container(
  170. child: Container(
  171. color: Colors.white,
  172. child: Column(
  173. crossAxisAlignment: CrossAxisAlignment.start,
  174. children: < Widget > [
  175. titleWidget('lib/images/icon_huowu.png', "货物信息"),
  176. underLine(),
  177. contentWiget("货物名称", widget.obj.goods),
  178. _inputWidget("数量", widget.obj.goodsQuantity),
  179. _inputWidget("运费", afterTransportFee),
  180. _inputWidget("代收", widget.obj.goodsAgencyFund / 100),
  181. _packageType('付款方式'),
  182. contentWiget(
  183. "保价", (widget.obj.goodsPriceProtection / 100).toString()),
  184. contentWiget("重量", widget.obj.goodsWeight.toStringAsFixed(1)),
  185. contentWiget("包装类型", (widget.obj.goodsPackingName)),
  186. contentWiget("货物类型", (widget.obj.goodsCategoryName)),
  187. _descWidget(widget.obj.memo),
  188. submitBtn(widget.obj.orderNo)
  189. ],
  190. ),
  191. ));
  192. }
  193. Widget _inputWidget(String key, num value) {
  194. return Padding(
  195. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  196. child: Column(
  197. children: < Widget > [
  198. SizedBox(
  199. height: ScreenUtil.getInstance().setHeight(89),
  200. child: Center(
  201. child: Row(
  202. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  203. children: < Widget > [
  204. Text(
  205. key,
  206. style: TextStyle(
  207. fontSize: ScreenUtil.getInstance().setSp(30),
  208. color: Color.fromRGBO(74, 74, 74, 1)),
  209. ),
  210. Container(
  211. width: ScreenUtil.getInstance().setWidth(300),
  212. child: Row(
  213. mainAxisAlignment: MainAxisAlignment.end,
  214. children: < Widget > [
  215. Expanded(
  216. //padding: EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(20)),
  217. //child: Text(value,style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(30), color: Color.fromRGBO(136, 136, 136, 1)), ),
  218. child: Center(
  219. child:Padding(
  220. padding: EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(30)),
  221. child: TextField(
  222. keyboardType: TextInputType.number,
  223. textAlign: TextAlign.end,
  224. style: TextStyle(
  225. fontSize:
  226. ScreenUtil.getInstance().setSp(30),
  227. color: Colors.black),
  228. decoration: InputDecoration(
  229. border: InputBorder.none,
  230. hintText: value.toString(),
  231. hintStyle: TextStyle(
  232. fontSize:
  233. ScreenUtil.getInstance().setSp(30),
  234. color: Colors.black),
  235. contentPadding: EdgeInsets.fromLTRB(
  236. ScreenUtil.getInstance().setWidth(20),
  237. 0,
  238. 0,
  239. 0),
  240. ),
  241. onChanged: (value) {
  242. if (key == '数量') {
  243. afterGoodsNumber = int.parse(value);
  244. } else if (key == '运费') {
  245. afterTransportFee = double.parse(value);
  246. String temp =
  247. afterTransportFee.toStringAsFixed(1);
  248. afterTransportFee = double.parse(temp);
  249. } else if (key == '代收') {
  250. afterCollectingFee = double.parse(value);
  251. String temp =
  252. afterCollectingFee.toStringAsFixed(1);
  253. afterCollectingFee = double.parse(temp);
  254. }
  255. },
  256. ),
  257. )
  258. )),
  259. // Icon(
  260. // Icons.keyboard_arrow_right,
  261. // color: Color.fromRGBO(199, 199, 204, 1),
  262. // )
  263. ],
  264. ))
  265. ],
  266. ),
  267. )),
  268. Expanded(flex: 0, child: underLine())
  269. ],
  270. ));
  271. }
  272. Widget _descWidget(String str) {
  273. return Container(
  274. padding: EdgeInsets.all(ScreenUtil.getInstance().setWidth(30)),
  275. child: Text(
  276. str,
  277. maxLines: 100,
  278. style: TextStyle(
  279. fontSize: ScreenUtil.getInstance().setSp(30),
  280. color: Color.fromRGBO(74, 74, 74, 1)),
  281. ),
  282. );
  283. }
  284. Widget submitBtn(String orderNo) {
  285. return GestureDetector(
  286. child: Container(
  287. margin: EdgeInsets.fromLTRB(
  288. ScreenUtil.getInstance().setWidth(30),
  289. ScreenUtil.getInstance().setWidth(50),
  290. ScreenUtil.getInstance().setWidth(30),
  291. ScreenUtil.getInstance().setWidth(40)),
  292. height: ScreenUtil.getInstance().setHeight(88),
  293. decoration: BoxDecoration(
  294. borderRadius: BorderRadius.all(Radius.circular(4)),
  295. color: Color.fromRGBO(37, 102, 242, 1),
  296. ),
  297. child: Center(
  298. child: Row(
  299. mainAxisAlignment: MainAxisAlignment.center,
  300. children: < Widget > [
  301. Offstage(
  302. offstage: submitStatus,
  303. child: SizedBox(
  304. width: ScreenUtil.getInstance().setWidth(45),
  305. height: ScreenUtil.getInstance().setHeight(45),
  306. child: Image.asset('lib/images/loading.gif'),
  307. ),
  308. ),
  309. Text('提交',
  310. style: TextStyle(
  311. fontSize: ScreenUtil.getInstance().setSp(36),
  312. color: Colors.white)),
  313. ],
  314. )),
  315. ),
  316. onTap: () {
  317. if (!submitStatus) return;
  318. if (afterCollectingFee > 0) {
  319. if (widget.obj.sendCompanyBankCard == null ||
  320. widget.obj.sendCompanyBankCard == '') {
  321. showDialog < Null > (
  322. context: context,
  323. barrierDismissible: false,
  324. builder: (BuildContext context) {
  325. return MyAlertDialog(text: '银行信息不全', childCallback: (val) {});
  326. });
  327. return;
  328. }
  329. }
  330. if (lineList.length > 1 && widget.status == '寄件' && !checkedLine) {
  331. showLineModal(lineList, orderNo);
  332. return;
  333. }
  334. submitOrder(orderNo);
  335. },
  336. );
  337. }
  338. Widget _packageType(String key) {
  339. return Padding(
  340. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  341. child: Column(
  342. children: < Widget > [
  343. InkWell(
  344. child: SizedBox(
  345. height: ScreenUtil.getInstance().setHeight(89),
  346. child: Center(
  347. child: Row(
  348. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  349. children: < Widget > [
  350. Expanded(
  351. flex: 0,
  352. child: Text(
  353. key,
  354. style: TextStyle(
  355. fontSize: ScreenUtil.getInstance().setSp(30),
  356. color: Color.fromRGBO(74, 74, 74, 1)),
  357. ),
  358. ),
  359. Expanded(
  360. child: Row(
  361. mainAxisAlignment: MainAxisAlignment.end,
  362. children: < Widget > [
  363. //Text('${value}', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(30), color: Color.fromRGBO(136, 136, 136, 1)), ),
  364. SizedBox(
  365. width: ScreenUtil.getInstance().setWidth(500),
  366. child: Text(
  367. showTextPaymentMehod,
  368. textAlign: TextAlign.end,
  369. )),
  370. Icon(
  371. Icons.keyboard_arrow_right,
  372. color: Color.fromRGBO(199, 199, 204, 1),
  373. )
  374. ],
  375. ))
  376. ],
  377. ),
  378. )),
  379. onTap: () {
  380. showPickerModal(context);
  381. },
  382. ),
  383. Expanded(flex: 0, child: underLine())
  384. ],
  385. ));
  386. }
  387. showPickerModal(BuildContext context) {
  388. List < dynamic > data = ['现付', '到付'];
  389. new Picker(
  390. adapter: PickerDataAdapter < String > (pickerdata: data),
  391. height: ScreenUtil.getInstance().setHeight(450),
  392. confirmText: '确定',
  393. confirmTextStyle: TextStyle(
  394. fontSize: ScreenUtil.getInstance().setSp(30),
  395. color: Color.fromRGBO(64, 98, 254, 1)),
  396. cancelText: '取消',
  397. cancelTextStyle: TextStyle(
  398. fontSize: ScreenUtil.getInstance().setSp(30),
  399. color: Color.fromRGBO(153, 153, 153, 1)),
  400. headercolor: Color.fromRGBO(245, 245, 245, 1),
  401. itemExtent: ScreenUtil.getInstance().setHeight(80),
  402. textStyle: TextStyle(
  403. fontSize: ScreenUtil.getInstance().setSp(30),
  404. color: Color.fromRGBO(42, 42, 42, 1)),
  405. changeToFirst: true,
  406. hideHeader: false,
  407. onConfirm: (Picker picker, List value) {
  408. setState(() {
  409. showTextPaymentMehod = data[value[0]];
  410. });
  411. if (showTextPaymentMehod == '现付') {
  412. goodsPaymentMethod = 1;
  413. } else {
  414. goodsPaymentMethod = 2;
  415. }
  416. }).showModal(this.context);
  417. }
  418. showLineModal(List < CompanyOfLineList > list, String orderNo) {
  419. showDialog < Null > (
  420. context: context, //BuildContext对象
  421. barrierDismissible: false,
  422. builder: (BuildContext context) {
  423. return ShowLineModal(
  424. lineList: list,
  425. childCallback: (val) {
  426. lineId = val;
  427. goodsNameAccurate(stationId,afterTransportFee.toString(),lineId).then((resp){
  428. if(isNotError(context, resp) && this.mounted){
  429. if(resp.data['data']['goods']!=null){
  430. GoodsPriceList tempObj = GoodsPriceObjAccurate.fromJson(resp.data).data;
  431. setState(() {
  432. afterTransportFee=tempObj.price/100;
  433. });
  434. }
  435. checkedLine = true;
  436. }
  437. });
  438. },
  439. );
  440. });
  441. }
  442. submitOrder(String orderNo) {
  443. setState(() {
  444. submitStatus = false;
  445. });
  446. updataOrder(lineId, orderNo, afterTransportFee, afterCollectingFee,
  447. afterGoodsNumber, goodsPaymentMethod)
  448. .then((resp) {
  449. if (isNotError(context, resp) && this.mounted) {
  450. showDialog < Null > (
  451. context: context, //BuildContext对象
  452. barrierDismissible: false,
  453. builder: (BuildContext context) {
  454. //打印
  455. OrderDetailObj parentObj = OrderDetailObj.fromJson(resp.data);
  456. OrderDetailData data = parentObj.data;
  457. getKey('printType').then((printType) {
  458. getKey('stationName').then((stationName) {
  459. getKey('nickName').then((nickName) {
  460. getKey('companyName').then((companyName) {
  461. getKey('companyCustomerPhone')
  462. .then((companyCustomerPhone) {
  463. double goodsYs = data.goodsPaymentMethod == 2 ?
  464. (data.goodsFreight / 100) +
  465. (data.goodsAgencyFund / 100) :
  466. data.goodsAgencyFund / 100;
  467. String nowDate = fromatDate(
  468. DateTime.now().millisecondsSinceEpoch); //打印时间
  469. String createTime = fromatDate(data.createTime);
  470. double goodsAgencyFunds = data.goodsAgencyFund / 100;
  471. double goodsDFreight = data.goodsPaymentMethod == 2 ?
  472. data.goodsFreight / 100 :
  473. 0;
  474. double goodsXFreight = data.goodsPaymentMethod == 1 ?
  475. data.goodsFreight / 100 :
  476. 0;
  477. String receiptAddress =
  478. data.receiptCompanyAddress.length > 10 ?
  479. data.receiptCompanyAddress.substring(0, 10) :
  480. data.receiptCompanyAddress;
  481. Map < String, String > pum = {
  482. "[logisticsNo]": "${data.orderNo ?? ''}",
  483. "[createTime]": "$createTime",
  484. "[sendStationName]": "$stationName",
  485. "[dealerCode]": "${data.sendCompanyCode ?? ''}",
  486. "[dealerName]": "${data.sendCompanyName}",
  487. "[dealerTel]": "${data.sendCompanyPhone ?? ''}",
  488. "[repairName]": "${data.receiptCompanyName ?? ''}",
  489. "[repairTel]": "${data.receiptCompanyPhone ?? ''}",
  490. "[endStationName]": "${data.receiptStationName}",
  491. "[goodsLineCode]": "${data.lineCode ?? ''}",
  492. "[goodsLine]": "${data.lineName ?? ''}",
  493. "[repairAddress]": "${receiptAddress ?? ''}",
  494. "[goodsQuantity]": "${data.goodsQuantity ?? ''}",
  495. "[goodsInsurance]": "${data.goodsInsurance ?? ''}",
  496. "[goodsFlatCost]": "${data.goodsFlatCost ?? ''}",
  497. // 到付 现付 金额
  498. "[goodsDFreight]": "$goodsDFreight",
  499. "[goodsXFreight]": "$goodsXFreight",
  500. "[goodsAgencyFund]": "$goodsAgencyFunds",
  501. "[goodsYs]": "$goodsYs",
  502. "[dealerBankAccount]": "${data.sendCompanyBankCard ?? ''}",
  503. "[goodsRemark]": "${data.memo ?? ''}",
  504. "[realName]": "${nickName ?? ''}",
  505. "[currentTime]": "$nowDate",
  506. "[currentGoodNumber]": "1/1",
  507. "[companyCustomerPhone]": "$companyCustomerPhone",
  508. "[companyName]": "$companyName"
  509. };
  510. bluetooth
  511. .printOrder(pum, int.parse(printType))
  512. .then((value) {
  513. if (value == null) {
  514. showDialog < Null > (
  515. context: context,
  516. barrierDismissible: false,
  517. builder: (BuildContext context) {
  518. return MyAlertDialog(
  519. text: '未连接打印机',
  520. childCallback: (val) {});
  521. });
  522. }
  523. });
  524. });
  525. });
  526. });
  527. });
  528. });
  529. return MyAlertDialog(
  530. //调用对话框
  531. text: '订单修改成功!',
  532. childCallback: (val) {
  533. Navigator.pop(context, true);
  534. },
  535. );
  536. });
  537. } else {
  538. setState(() {
  539. submitStatus = true;
  540. });
  541. OrderDetailObj parentObj = OrderDetailObj.fromJson(resp.data);
  542. showDialog < Null > (
  543. context: context, //BuildContext对象
  544. barrierDismissible: false,
  545. builder: (BuildContext context) {
  546. return MyAlertDialog( //调用对话框
  547. text: parentObj.msg, childCallback: (val) {
  548. Navigator.pop(context, true);
  549. },
  550. );
  551. });
  552. }
  553. });
  554. }
  555. }
  556. Widget titleWidget(String iconUrl, String str) {
  557. return Container(
  558. height: ScreenUtil.getInstance().setHeight(90),
  559. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  560. child: Center(
  561. child: Row(
  562. mainAxisAlignment: MainAxisAlignment.start,
  563. children: < Widget > [
  564. Padding(
  565. padding: EdgeInsets.only(
  566. right: ScreenUtil.getInstance().setHeight(20)),
  567. child: Image.asset(
  568. iconUrl,
  569. width: ScreenUtil.getInstance().setWidth(40),
  570. height: ScreenUtil.getInstance().setHeight(40),
  571. )),
  572. Text(
  573. str,
  574. style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(32)),
  575. )
  576. ],
  577. ),
  578. ),
  579. );
  580. }
  581. Widget underLine() {
  582. return Container(
  583. color: Color.fromRGBO(223, 223, 223, 1),
  584. height: ScreenUtil.getInstance().setHeight(1),
  585. );
  586. }
  587. Widget contentWiget(String key, String value) {
  588. return Padding(
  589. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  590. child: Column(
  591. children: < Widget > [
  592. Padding(
  593. padding:
  594. EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(30)),
  595. child: SizedBox(
  596. height: ScreenUtil.getInstance().setHeight(89),
  597. child: Center(
  598. child: Row(
  599. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  600. children: < Widget > [
  601. Text(
  602. key,
  603. style: TextStyle(
  604. fontSize: ScreenUtil.getInstance().setSp(30),
  605. color: Color.fromRGBO(74, 74, 74, 1)),
  606. ),
  607. Text(
  608. value,
  609. style: TextStyle(
  610. fontSize: ScreenUtil.getInstance().setSp(30),
  611. color: Color.fromRGBO(136, 136, 136, 1)),
  612. ),
  613. ],
  614. ),
  615. ))),
  616. Expanded(flex: 0, child: underLine())
  617. ],
  618. ));
  619. }
  620. Widget lastContentWiget(String key, String value) {
  621. return Padding(
  622. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  623. child: Padding(
  624. padding: EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(30)),
  625. child: SizedBox(
  626. height: ScreenUtil.getInstance().setHeight(89),
  627. child: Center(
  628. child: Row(
  629. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  630. children: < Widget > [
  631. Text(
  632. key,
  633. style: TextStyle(
  634. fontSize: ScreenUtil.getInstance().setSp(30),
  635. color: Color.fromRGBO(74, 74, 74, 1)),
  636. ),
  637. Text(
  638. value,
  639. style: TextStyle(
  640. fontSize: ScreenUtil.getInstance().setSp(30),
  641. color: Color.fromRGBO(136, 136, 136, 1)),
  642. ),
  643. ],
  644. ),
  645. ))),
  646. );
  647. }
  648. Widget _getMoreWidget() {
  649. return Center(
  650. child: Padding(
  651. padding: EdgeInsets.all(10.0),
  652. child: Row(
  653. mainAxisAlignment: MainAxisAlignment.center,
  654. crossAxisAlignment: CrossAxisAlignment.center,
  655. children: < Widget > [
  656. Text(
  657. '加载中...',
  658. style: TextStyle(fontSize: 16.0),
  659. ),
  660. Container(
  661. width: ScreenUtil.getInstance().setWidth(50),
  662. height: ScreenUtil.getInstance().setHeight(50),
  663. child: CircularProgressIndicator())
  664. ],
  665. ),
  666. ),
  667. );
  668. }