order_detail_page.dart 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  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. @override
  136. void initState() {
  137. super.initState();
  138. setState(() {
  139. afterTransportFee = widget.obj.goodsFreight / 100;
  140. afterGoodsNumber = widget.obj.goodsQuantity;
  141. afterCollectingFee = widget.obj.goodsAgencyFund / 100;
  142. lineId = widget.obj.lineId.toString();
  143. });
  144. if (widget.obj.receiptCompanyId != null) {
  145. getLineOfCompanyId(widget.obj.receiptCompanyId.toString()).then((resp) {
  146. if (isNotError(context, resp) && this.mounted) {
  147. CompanyOfLine obj = CompanyOfLine.fromJson(resp.data);
  148. setState(() {
  149. lineList = obj.data;
  150. });
  151. }
  152. });
  153. }
  154. showTextPaymentMehod = widget.obj.goodsPaymentMethod == 1 ? '现付' : '到付';
  155. goodsPaymentMethod = widget.obj.goodsPaymentMethod;
  156. }
  157. @override
  158. Widget build(BuildContext context) {
  159. return Container(
  160. child: Container(
  161. color: Colors.white,
  162. child: Column(
  163. crossAxisAlignment: CrossAxisAlignment.start,
  164. children: < Widget > [
  165. titleWidget('lib/images/icon_huowu.png', "货物信息"),
  166. underLine(),
  167. contentWiget("货物名称", widget.obj.goods),
  168. _inputWidget("数量", widget.obj.goodsQuantity),
  169. _inputWidget("运费", widget.obj.goodsFreight / 100),
  170. _inputWidget("代收", widget.obj.goodsAgencyFund / 100),
  171. _packageType('付款方式'),
  172. contentWiget(
  173. "保价", (widget.obj.goodsPriceProtection / 100).toString()),
  174. contentWiget("重量", widget.obj.goodsWeight.toStringAsFixed(1)),
  175. contentWiget("包装类型", (widget.obj.goodsPackingName)),
  176. contentWiget("货物类型", (widget.obj.goodsCategoryName)),
  177. _descWidget(widget.obj.memo),
  178. submitBtn(widget.obj.orderNo)
  179. ],
  180. ),
  181. ));
  182. }
  183. Widget _inputWidget(String key, num value) {
  184. return Padding(
  185. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  186. child: Column(
  187. children: < Widget > [
  188. SizedBox(
  189. height: ScreenUtil.getInstance().setHeight(89),
  190. child: Center(
  191. child: Row(
  192. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  193. children: < Widget > [
  194. Text(
  195. key,
  196. style: TextStyle(
  197. fontSize: ScreenUtil.getInstance().setSp(30),
  198. color: Color.fromRGBO(74, 74, 74, 1)),
  199. ),
  200. Container(
  201. width: ScreenUtil.getInstance().setWidth(300),
  202. child: Row(
  203. mainAxisAlignment: MainAxisAlignment.end,
  204. children: < Widget > [
  205. Expanded(
  206. //padding: EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(20)),
  207. //child: Text(value,style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(30), color: Color.fromRGBO(136, 136, 136, 1)), ),
  208. child: Center(
  209. child: TextField(
  210. keyboardType: TextInputType.number,
  211. textAlign: TextAlign.end,
  212. style: TextStyle(
  213. fontSize:
  214. ScreenUtil.getInstance().setSp(30),
  215. color: Colors.black),
  216. decoration: InputDecoration(
  217. border: InputBorder.none,
  218. hintText: value.toString(),
  219. hintStyle: TextStyle(
  220. fontSize:
  221. ScreenUtil.getInstance().setSp(30),
  222. color: Colors.black),
  223. contentPadding: EdgeInsets.fromLTRB(
  224. ScreenUtil.getInstance().setWidth(20),
  225. 0,
  226. 0,
  227. 0),
  228. ),
  229. onChanged: (value) {
  230. if (key == '数量') {
  231. afterGoodsNumber = int.parse(value);
  232. } else if (key == '运费') {
  233. afterTransportFee = double.parse(value);
  234. String temp =
  235. afterTransportFee.toStringAsFixed(1);
  236. afterTransportFee = double.parse(temp);
  237. } else if (key == '代收') {
  238. afterCollectingFee = double.parse(value);
  239. String temp =
  240. afterCollectingFee.toStringAsFixed(1);
  241. afterCollectingFee = double.parse(temp);
  242. }
  243. },
  244. ),
  245. )),
  246. Icon(
  247. Icons.keyboard_arrow_right,
  248. color: Color.fromRGBO(199, 199, 204, 1),
  249. )
  250. ],
  251. ))
  252. ],
  253. ),
  254. )),
  255. Expanded(flex: 0, child: underLine())
  256. ],
  257. ));
  258. }
  259. Widget _descWidget(String str) {
  260. return Container(
  261. padding: EdgeInsets.all(ScreenUtil.getInstance().setWidth(30)),
  262. child: Text(
  263. str,
  264. maxLines: 100,
  265. style: TextStyle(
  266. fontSize: ScreenUtil.getInstance().setSp(30),
  267. color: Color.fromRGBO(74, 74, 74, 1)),
  268. ),
  269. );
  270. }
  271. Widget submitBtn(String orderNo) {
  272. return GestureDetector(
  273. child: Container(
  274. margin: EdgeInsets.fromLTRB(
  275. ScreenUtil.getInstance().setWidth(30),
  276. ScreenUtil.getInstance().setWidth(50),
  277. ScreenUtil.getInstance().setWidth(30),
  278. ScreenUtil.getInstance().setWidth(40)),
  279. height: ScreenUtil.getInstance().setHeight(88),
  280. decoration: BoxDecoration(
  281. borderRadius: BorderRadius.all(Radius.circular(4)),
  282. color: Color.fromRGBO(37, 102, 242, 1),
  283. ),
  284. child: Center(
  285. child: Row(
  286. mainAxisAlignment: MainAxisAlignment.center,
  287. children: < Widget > [
  288. Offstage(
  289. offstage: submitStatus,
  290. child: SizedBox(
  291. width: ScreenUtil.getInstance().setWidth(45),
  292. height: ScreenUtil.getInstance().setHeight(45),
  293. child: Image.asset('lib/images/loading.gif'),
  294. ),
  295. ),
  296. Text('提交',
  297. style: TextStyle(
  298. fontSize: ScreenUtil.getInstance().setSp(36),
  299. color: Colors.white)),
  300. ],
  301. )),
  302. ),
  303. onTap: () {
  304. if (!submitStatus) return;
  305. if (afterCollectingFee > 0) {
  306. if (widget.obj.sendCompanyBankCard == null ||
  307. widget.obj.sendCompanyBankCard == '') {
  308. showDialog < Null > (
  309. context: context,
  310. barrierDismissible: false,
  311. builder: (BuildContext context) {
  312. return MyAlertDialog(text: '银行信息不全', childCallback: (val) {});
  313. });
  314. return;
  315. }
  316. }
  317. if (lineList.length > 1 && widget.status == '寄件') {
  318. showLineModal(lineList, orderNo);
  319. return;
  320. }
  321. submitOrder(orderNo);
  322. },
  323. );
  324. }
  325. Widget _packageType(String key) {
  326. return Padding(
  327. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  328. child: Column(
  329. children: < Widget > [
  330. InkWell(
  331. child: SizedBox(
  332. height: ScreenUtil.getInstance().setHeight(89),
  333. child: Center(
  334. child: Row(
  335. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  336. children: < Widget > [
  337. Expanded(
  338. flex: 0,
  339. child: Text(
  340. key,
  341. style: TextStyle(
  342. fontSize: ScreenUtil.getInstance().setSp(30),
  343. color: Color.fromRGBO(74, 74, 74, 1)),
  344. ),
  345. ),
  346. Expanded(
  347. child: Row(
  348. mainAxisAlignment: MainAxisAlignment.end,
  349. children: < Widget > [
  350. //Text('${value}', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(30), color: Color.fromRGBO(136, 136, 136, 1)), ),
  351. SizedBox(
  352. width: ScreenUtil.getInstance().setWidth(500),
  353. child: Text(
  354. showTextPaymentMehod,
  355. textAlign: TextAlign.end,
  356. )),
  357. Icon(
  358. Icons.keyboard_arrow_right,
  359. color: Color.fromRGBO(199, 199, 204, 1),
  360. )
  361. ],
  362. ))
  363. ],
  364. ),
  365. )),
  366. onTap: () {
  367. showPickerModal(context);
  368. },
  369. ),
  370. Expanded(flex: 0, child: underLine())
  371. ],
  372. ));
  373. }
  374. showPickerModal(BuildContext context) {
  375. List < dynamic > data = ['现付', '到付'];
  376. new Picker(
  377. adapter: PickerDataAdapter < String > (pickerdata: data),
  378. height: ScreenUtil.getInstance().setHeight(450),
  379. confirmText: '确定',
  380. confirmTextStyle: TextStyle(
  381. fontSize: ScreenUtil.getInstance().setSp(30),
  382. color: Color.fromRGBO(64, 98, 254, 1)),
  383. cancelText: '取消',
  384. cancelTextStyle: TextStyle(
  385. fontSize: ScreenUtil.getInstance().setSp(30),
  386. color: Color.fromRGBO(153, 153, 153, 1)),
  387. headercolor: Color.fromRGBO(245, 245, 245, 1),
  388. itemExtent: ScreenUtil.getInstance().setHeight(80),
  389. textStyle: TextStyle(
  390. fontSize: ScreenUtil.getInstance().setSp(30),
  391. color: Color.fromRGBO(42, 42, 42, 1)),
  392. changeToFirst: true,
  393. hideHeader: false,
  394. onConfirm: (Picker picker, List value) {
  395. setState(() {
  396. showTextPaymentMehod = data[value[0]];
  397. });
  398. if (showTextPaymentMehod == '现付') {
  399. goodsPaymentMethod = 1;
  400. } else {
  401. goodsPaymentMethod = 2;
  402. }
  403. }).showModal(this.context);
  404. }
  405. showLineModal(List < CompanyOfLineList > list, String orderNo) {
  406. showDialog < Null > (
  407. context: context, //BuildContext对象
  408. barrierDismissible: false,
  409. builder: (BuildContext context) {
  410. return ShowLineModal(
  411. lineList: list,
  412. childCallback: (val) {
  413. lineId = val;
  414. submitOrder(orderNo);
  415. },
  416. );
  417. });
  418. }
  419. submitOrder(String orderNo) {
  420. setState(() {
  421. submitStatus = false;
  422. });
  423. updataOrder(lineId, orderNo, afterTransportFee, afterCollectingFee,
  424. afterGoodsNumber, goodsPaymentMethod)
  425. .then((resp) {
  426. if (isNotError(context, resp) && this.mounted) {
  427. showDialog < Null > (
  428. context: context, //BuildContext对象
  429. barrierDismissible: false,
  430. builder: (BuildContext context) {
  431. //打印
  432. OrderDetailObj parentObj = OrderDetailObj.fromJson(resp.data);
  433. if (parentObj.success) {
  434. OrderDetailData data = parentObj.data;
  435. getKey('printType').then((printType) {
  436. getKey('stationName').then((stationName) {
  437. getKey('nickName').then((nickName) {
  438. getKey('companyName').then((companyName) {
  439. getKey('companyCustomerPhone')
  440. .then((companyCustomerPhone) {
  441. double goodsYs = data.goodsPaymentMethod == 2 ?
  442. (data.goodsFreight / 100) +
  443. (data.goodsAgencyFund / 100) :
  444. data.goodsAgencyFund / 100;
  445. String nowDate = fromatDate(
  446. DateTime.now().millisecondsSinceEpoch); //打印时间
  447. String createTime = fromatDate(data.createTime);
  448. double goodsAgencyFunds = data.goodsAgencyFund / 100;
  449. double goodsDFreight = data.goodsPaymentMethod == 2 ?
  450. data.goodsFreight / 100 :
  451. 0;
  452. double goodsXFreight = data.goodsPaymentMethod == 1 ?
  453. data.goodsFreight / 100 :
  454. 0;
  455. String receiptAddress =
  456. data.receiptCompanyAddress.length > 10 ?
  457. data.receiptCompanyAddress.substring(0, 10) :
  458. data.receiptCompanyAddress;
  459. Map < String, String > pum = {
  460. "[logisticsNo]": "${data.orderNo ?? ''}",
  461. "[createTime]": "$createTime",
  462. "[sendStationName]": "$stationName",
  463. "[dealerCode]": "${data.sendCompanyCode ?? ''}",
  464. "[dealerName]": "${data.sendCompanyName}",
  465. "[dealerTel]": "${data.sendCompanyPhone ?? ''}",
  466. "[repairName]": "${data.receiptCompanyName ?? ''}",
  467. "[repairTel]": "${data.receiptCompanyPhone ?? ''}",
  468. "[endStationName]": "${data.receiptStationName}",
  469. "[goodsLineCode]": "${data.lineCode ?? ''}",
  470. "[goodsLine]": "${data.lineName ?? ''}",
  471. "[repairAddress]": "${receiptAddress ?? ''}",
  472. "[goodsQuantity]": "${data.goodsQuantity ?? ''}",
  473. "[goodsInsurance]": "${data.goodsInsurance ?? ''}",
  474. "[goodsFlatCost]": "${data.goodsFlatCost ?? ''}",
  475. // 到付 现付 金额
  476. "[goodsDFreight]": "$goodsDFreight",
  477. "[goodsXFreight]": "$goodsXFreight",
  478. "[goodsAgencyFund]": "$goodsAgencyFunds",
  479. "[goodsYs]": "$goodsYs",
  480. "[dealerBankAccount]": "${data.sendCompanyBankCard ?? ''}",
  481. "[goodsRemark]": "${data.memo ?? ''}",
  482. "[realName]": "${nickName ?? ''}",
  483. "[currentTime]": "$nowDate",
  484. "[currentGoodNumber]": "1/1",
  485. "[companyCustomerPhone]": "$companyCustomerPhone",
  486. "[companyName]": "$companyName"
  487. };
  488. bluetooth
  489. .printOrder(pum, int.parse(printType))
  490. .then((value) {
  491. if (value == null) {
  492. showDialog < Null > (
  493. context: context,
  494. barrierDismissible: false,
  495. builder: (BuildContext context) {
  496. return MyAlertDialog(
  497. text: '未连接打印机',
  498. childCallback: (val) {});
  499. });
  500. }
  501. });
  502. });
  503. });
  504. });
  505. });
  506. });
  507. return MyAlertDialog(
  508. //调用对话框
  509. text: '订单修改成功!',
  510. childCallback: (val) {
  511. if (val) {
  512. Navigator.pop(context, true);
  513. }
  514. },
  515. );
  516. } else {
  517. showDialog < Null > (
  518. context: context,
  519. barrierDismissible: false,
  520. builder: (BuildContext context) {
  521. return MyAlertDialog(
  522. text: parentObj.msg, childCallback: (val) {
  523. Navigator.pop(context, true);
  524. });
  525. });
  526. }
  527. });
  528. } else {
  529. setState(() {
  530. submitStatus = true;
  531. });
  532. }
  533. });
  534. }
  535. }
  536. Widget titleWidget(String iconUrl, String str) {
  537. return Container(
  538. height: ScreenUtil.getInstance().setHeight(90),
  539. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  540. child: Center(
  541. child: Row(
  542. mainAxisAlignment: MainAxisAlignment.start,
  543. children: < Widget > [
  544. Padding(
  545. padding: EdgeInsets.only(
  546. right: ScreenUtil.getInstance().setHeight(20)),
  547. child: Image.asset(
  548. iconUrl,
  549. width: ScreenUtil.getInstance().setWidth(40),
  550. height: ScreenUtil.getInstance().setHeight(40),
  551. )),
  552. Text(
  553. str,
  554. style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(32)),
  555. )
  556. ],
  557. ),
  558. ),
  559. );
  560. }
  561. Widget underLine() {
  562. return Container(
  563. color: Color.fromRGBO(223, 223, 223, 1),
  564. height: ScreenUtil.getInstance().setHeight(1),
  565. );
  566. }
  567. Widget contentWiget(String key, String value) {
  568. return Padding(
  569. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  570. child: Column(
  571. children: < Widget > [
  572. Padding(
  573. padding:
  574. EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(30)),
  575. child: SizedBox(
  576. height: ScreenUtil.getInstance().setHeight(89),
  577. child: Center(
  578. child: Row(
  579. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  580. children: < Widget > [
  581. Text(
  582. key,
  583. style: TextStyle(
  584. fontSize: ScreenUtil.getInstance().setSp(30),
  585. color: Color.fromRGBO(74, 74, 74, 1)),
  586. ),
  587. Text(
  588. value,
  589. style: TextStyle(
  590. fontSize: ScreenUtil.getInstance().setSp(30),
  591. color: Color.fromRGBO(136, 136, 136, 1)),
  592. ),
  593. ],
  594. ),
  595. ))),
  596. Expanded(flex: 0, child: underLine())
  597. ],
  598. ));
  599. }
  600. Widget lastContentWiget(String key, String value) {
  601. return Padding(
  602. padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
  603. child: Padding(
  604. padding: EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(30)),
  605. child: SizedBox(
  606. height: ScreenUtil.getInstance().setHeight(89),
  607. child: Center(
  608. child: Row(
  609. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  610. children: < Widget > [
  611. Text(
  612. key,
  613. style: TextStyle(
  614. fontSize: ScreenUtil.getInstance().setSp(30),
  615. color: Color.fromRGBO(74, 74, 74, 1)),
  616. ),
  617. Text(
  618. value,
  619. style: TextStyle(
  620. fontSize: ScreenUtil.getInstance().setSp(30),
  621. color: Color.fromRGBO(136, 136, 136, 1)),
  622. ),
  623. ],
  624. ),
  625. ))),
  626. );
  627. }
  628. Widget _getMoreWidget() {
  629. return Center(
  630. child: Padding(
  631. padding: EdgeInsets.all(10.0),
  632. child: Row(
  633. mainAxisAlignment: MainAxisAlignment.center,
  634. crossAxisAlignment: CrossAxisAlignment.center,
  635. children: < Widget > [
  636. Text(
  637. '加载中...',
  638. style: TextStyle(fontSize: 16.0),
  639. ),
  640. Container(
  641. width: ScreenUtil.getInstance().setWidth(50),
  642. height: ScreenUtil.getInstance().setHeight(50),
  643. child: CircularProgressIndicator())
  644. ],
  645. ),
  646. ),
  647. );
  648. }