import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:ysairplane2/base/YSBase.dart'; import 'package:ysairplane2/tools/YSNetWorking.dart'; import 'package:ysairplane2/tools/YSPayKeybord.dart'; import 'package:ysairplane2/tools/YSTools.dart'; import 'YSMoney.dart'; import 'YSSetPayPass.dart'; class YSCourseDetail extends StatefulWidget { final orderStr; const YSCourseDetail({Key key, this.orderStr}) : super(key: key); @override _YSCourseDetailState createState() => _YSCourseDetailState(); } class _YSCourseDetailState extends State { Map _courseDict; @override void initState() { Future.delayed(Duration(seconds: 0)).then((value){ _getCourseDetailData(); }); super.initState(); } @override Widget build(BuildContext context) { return YSBase( ystitle: '订单详情', yscolor: Color(0xFFF5F5F5), yschild: _courseDict!=null?Column( children: [ Container( height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-(_courseDict['payStatus']==1?hsp(120):0), child: SingleChildScrollView( child: Column( children: [ Container( padding: EdgeInsets.only(left: hsp(30),right: hsp(30),top: hsp(50),bottom: hsp(50)), color: Color(0xFF2B7BF6), child: Row( children: [ Icon(Icons.access_time,color: Colors.white,size: hsp(60),), Container( padding: EdgeInsets.only(left: hsp(20)), height: hsp(100), alignment: Alignment.center, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(_courseDict['payStatus']==1?'未支付':_courseDict['consumed']==2?'已完成':'已支付',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(36),color: Colors.white),), Container( width: MediaQuery.of(context).size.width-hsp(200), child: SingleChildScrollView( child: Text(_courseDict['title']!=null?'${_courseDict['title']}':_courseDict['setoutCity']!=null? '${_courseDict['setoutCity']} - ${_courseDict['arriveCity']} ${_courseDict['name']}':'${_courseDict['name']}', style: TextStyle(fontSize: zsp(26),color: Colors.white),maxLines: 1,), scrollDirection: Axis.horizontal, ), ) ], ), ) ], ), ), _courseDict['type']==7?ListView.separated( itemBuilder: (context,index){ return Container( color: Colors.white, child: Column( children: [ Row( children: [ Container( height: hsp(40), alignment: Alignment.center, child: Text('${index+1}',style: TextStyle(fontSize: zsp(20),color: Colors.white),), padding: EdgeInsets.only(left: wsp(20),right: wsp(20)), margin: EdgeInsets.only(right: wsp(30)), decoration: BoxDecoration( color: Color(0xFF007EFF), borderRadius: BorderRadius.only(topRight: Radius.circular(3),bottomRight: Radius.circular(8)) ), ), ], ), Container( padding: EdgeInsets.all(hsp(20)), child: Row( children: [ Icon(Icons.access_time,color: Color(0xFFBABAC6),size: hsp(28),), Text(' ${_courseDict['Itinerary'][index]['timeSetout']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF24242B)),) ], ), ), Container( width: MediaQuery.of(context).size.width-hsp(40), child: ListView.builder( itemBuilder: (context,indexSub2){ return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Column( children: [ Container( height: hsp(28), width: hsp(28), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(50)), border: Border.all(color: indexSub2==0?Color(0xFF02C094):Color(0xFFFB9658),width: wsp(6)) ), margin: EdgeInsets.only(top: hsp(7),bottom: hsp(7)), ), if(indexSub2<1)Container( height: hsp(28), child: DashedRect( color: Color(0xFFCACAD4), strokeWidth: 1, gap: 1 ), ) ], ), Container( child: Text(_courseDict['Itinerary'][index]['setout']!=null?' ${_courseDict['Itinerary'][index][indexSub2==0?'setout':'arrive']}': ' ${_courseDict['Itinerary'][index][indexSub2==0?'setOutInfo':'arriveInfo']['airplaneName']}', style: TextStyle(color: Color(0xFF68686F),fontSize: zsp(28))), width: MediaQuery.of(context).size.width-hsp(120), ), ], ); }, itemCount: 2, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.only(bottom: hsp(10)), ), ) ], ), ); }, separatorBuilder: (context,index){ return Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF5F5F5),); }, itemCount: _courseDict['Itinerary'].length, padding: EdgeInsets.only(bottom: hsp(10),top: hsp(10)), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), ):_courseDict['type']==1||_courseDict['type']==3||_courseDict['type']==6||_courseDict['type']==8?ListView.separated( itemBuilder: (context,index){ return Container( color: Colors.white, child: Column( children: [ Container( padding: EdgeInsets.all(hsp(20)), child: Row( children: [ Icon(Icons.access_time,color: Color(0xFFBABAC6),size: hsp(28),), Text(' ${_courseDict['time']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF24242B)),) ], ), ), Container( width: MediaQuery.of(context).size.width-hsp(40), child: ListView.builder( itemBuilder: (context,indexSub2){ return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Column( children: [ Container( height: hsp(28), width: hsp(28), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(50)), border: Border.all(color: indexSub2==0?Color(0xFF02C094):Color(0xFFFB9658),width: wsp(6)) ), margin: EdgeInsets.only(top: hsp(7),bottom: hsp(7)), ), if(indexSub2<1)Container( height: hsp(28), child: DashedRect( color: Color(0xFFCACAD4), strokeWidth: 1, gap: 1 ), ) ], ), Container( child: Text(' ${indexSub2==0?_courseDict['setout']:_courseDict['arrive']} ',style: TextStyle(color: Color(0xFF68686F),fontSize: zsp(28))), width: MediaQuery.of(context).size.width-hsp(120), ), ], ); }, itemCount: 2, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.only(bottom: hsp(10)), ), ) ], ), ); }, separatorBuilder: (context,index){ return Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF5F5F5),); }, itemCount: 1, padding: EdgeInsets.only(bottom: hsp(10),top: hsp(10)), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), ):_courseDict['type']==5||_courseDict['type']==9?Container( height: hsp(85), color: Colors.white, padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), margin: EdgeInsets.only(top: hsp(10),bottom: hsp(10)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(_courseDict['type']==5?'出行时间':'游览时间',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text('${_courseDict['time']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),) ], ), ):_courseDict['type']==4?ListView.separated( itemBuilder: (context,index){ return Container( height: hsp(85), color: Colors.white, padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(index==0?'婚礼地点':index==1?'婚礼时间':index==2?'婚礼人数':index==3?'飞行时长':'祝福贺语', style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text(index==0?'${_courseDict['setout']}':index==1?'${_courseDict['time']}':index==2?'${_courseDict['personNum']}人' :index==3?'${_courseDict['hour']}':'${_courseDict['des']}', style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),) ], ), ); }, separatorBuilder: (context,index){ return Divider(color: Color(0xFFF5F5F5),height: 0.5,thickness: 0.5,); }, itemCount: _courseDict['des']==null?4:5, padding: EdgeInsets.only(top: hsp(10),bottom: hsp(10)), shrinkWrap: true, ):ListView.separated( itemBuilder: (context,index){ return Container( height: hsp(85), color: Colors.white, padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(index==0?'救援地点':index==1?'救援时间':index==2?'救援类型':index==3?'涉险人数':'联系电话',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text(index==0?'${_courseDict['setoutCity']}':index==1?'${_courseDict['time']}':index==2?'${_courseDict['rescueType']}':index==3?'${_courseDict['personNum']}人':'${getSecretStr('${_courseDict['phone']}')}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),) ], ), ); }, separatorBuilder: (context,index){ return Divider(color: Color(0xFFF5F5F5),height: 0.5,thickness: 0.5,); }, itemCount: 5, padding: EdgeInsets.only(top: hsp(10),bottom: hsp(10)), shrinkWrap: true, ), if(_courseDict['personInfos']!=null)Container( padding: EdgeInsets.only(top: hsp(30),bottom: hsp(30)), width: MediaQuery.of(context).size.width, color: Colors.white, child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( width: wsp(150), alignment: Alignment.center, child: Text('乘机人',style: TextStyle(fontSize: zsp(30),color: Color(0xFF9A9A9A)),), ), Container( width: MediaQuery.of(context).size.width-hsp(60)-wsp(150), child: ListView.separated( itemBuilder: (context,index){ return Container( width: MediaQuery.of(context).size.width-hsp(60)-wsp(150), padding: EdgeInsets.only(bottom: index==_courseDict['personInfos'].length-1?0:hsp(20),top: index==0?0:hsp(20)), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ RichText( text: TextSpan( text: '${_courseDict['personInfos'][index]['username']}', style: TextStyle(fontSize: zsp(32),color: Color(0xFF343434),fontWeight: FontWeight.bold), children: [ TextSpan( text: ' ${getSecretStr('${_courseDict['personInfos'][index]['phone']}')}', style: TextStyle(fontSize: zsp(25),color: Color(0xFF666666),fontWeight: FontWeight.normal) ) ] ), ), Text('身份证 ${getSecretStr('${_courseDict['personInfos'][index]['cardid']}')}',style: TextStyle(fontSize: zsp(25),color: Color(0xFF666666),)) ], ), ); }, separatorBuilder: (context,index){ return Divider(color: Color(0xFFE5E5E5),height: 0.5,thickness: 0.5,); }, itemCount: _courseDict['personInfos'].length, padding: EdgeInsets.all(0), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), ), ), ], ), ), if(_courseDict['type']==3)ListView.separated( itemBuilder: (context,index){ return Container( height: hsp(85), padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), color: Colors.white, alignment: Alignment.centerLeft, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(index==0?'货物名称':index==1?'性质':index==2?'体积':'支付时间',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text(index==0?'${_courseDict['goods']['goodsName']}':index==1?'${_courseDict['goods']['goodsNatureName']}':index==2? '${_courseDict['goods']['goodsVolume']}立方米':'${_courseDict['goods']['goodsWeight']}吨', style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),) ], ), ); }, separatorBuilder: (context,index){ return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),); }, itemCount: 4, shrinkWrap: true, padding: EdgeInsets.only(top: hsp(10)), physics: NeverScrollableScrollPhysics(), ), if(_courseDict['personNum']!=null)if(_courseDict['type']!=2||_courseDict['type']!=3)Container( height: hsp(85), color: Colors.white, padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), margin: EdgeInsets.only(bottom: 0.5,top: hsp(10)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('出行人数',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text('${_courseDict['personNum']}个人',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),) ], ), ), if(_courseDict['airplane']!=null)Container( height: hsp(85), color: Colors.white, padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('飞机型号',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text('${_courseDict['airplane']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),) ], ), ), if(_courseDict['type']!=2)Container( height: hsp(85), color: Colors.white, padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), margin: EdgeInsets.only(top: hsp(10)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(_courseDict['payStatus']==1?'待支付':'已支付',style: TextStyle(fontSize: zsp(28),color: Colors.black),), Text('¥${_courseDict['payPrice']!=null?_courseDict['payPrice']:_courseDict['price']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFFEC364E)),) ], ), ), ListView.separated( padding: EdgeInsets.only(top: hsp(10)), itemBuilder: (context,index){ return Container( height: hsp(85), padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), color: Colors.white, alignment: Alignment.centerLeft, child: index==0?Text('详细信息',style: TextStyle(fontSize: zsp(28),color: Colors.black),):Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(index==1?'订单编号':index==2?'订单时间':index==3?'支付方式':'支付时间',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text(index==1?'${_courseDict['orderSn']}':index==2?'${_courseDict['orderCreateTime']}':index==3?'${_courseDict['orderWay']==1?'余额':_courseDict['orderWay']==2?'微信':'支付宝'}': '${_courseDict['payTime']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),) ], ), ); }, separatorBuilder: (context,index){ return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),); }, itemCount: _courseDict['payStatus']==2?5:3, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), ), if(_courseDict['refundStatus']==1)Container( width: MediaQuery.of(context).size.width, color: Colors.white, child: Column( children: [ ListView.separated( physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: 3, itemBuilder: (context,index){ return Container( height: hsp(85), padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(index==0?'退款时间':index==1?'退款金额':'违约金',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text('${index==0?'${_courseDict['refundTime']}':index==1?'¥${_courseDict['refundPrice']}':'¥${_courseDict['finePrice']}'}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), ], ), ); }, separatorBuilder: (context,index){ return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),); }, ) ], ), ), if(_courseDict['services']!=null)Container( margin: EdgeInsets.only(top: hsp(10)), width: MediaQuery.of(context).size.width, color: Colors.white, child: Column( children: [ Container( height: hsp(85), padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), alignment: Alignment.centerLeft, child: Text('选择套餐',style: TextStyle(fontSize: zsp(30),color: Color(0xFF999999)),), ), Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),), ListView.separated( physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: _courseDict['services'].length, itemBuilder: (context,index){ return Container( height: hsp(85), padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('${_courseDict['services'][index]['name']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), Text('¥${_courseDict['services'][index]['price']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),), ], ), ); }, separatorBuilder: (context,index){ return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),); }, ) ], ), ), if(_courseDict['codeUrl']!=null)Container( margin: EdgeInsets.only(top: hsp(10),bottom: hsp(50)), width: MediaQuery.of(context).size.width, padding: EdgeInsets.only(top: hsp(50),bottom: hsp(50)), color: Colors.white, alignment: Alignment.center, child: Image( height: hsp(400), width: hsp(400), image: NetworkImage('${_courseDict['codeUrl']}'), ), ) ], ), ), ), if(_courseDict['payStatus']==1)Container( height: hsp(120), width: MediaQuery.of(context).size.width, color: Colors.white, padding: EdgeInsets.only(left: wsp(60),right: wsp(60)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GestureDetector( onTap: (){ showDialog( context: context, builder: (context) { return AlertDialog( actionsPadding: EdgeInsets.all(0), title: Text('提示',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(36)),), content: Text('确认取消订单吗?',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(30))), actions: [ FlatButton(child: Text('取消',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(30))),onPressed: (){ Navigator.pop(context); },), FlatButton(child: Text('确认',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(30))),onPressed: (){ Navigator.pop(context); _postCancelOrderData(); },), ], ); } ); }, child: Container( height: hsp(88), width: wsp(300), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(50)), border: Border.all(color: Color(0xFFD9D9D9),width: 1) ), alignment: Alignment.center, child: Text('取消订单',style: TextStyle(fontSize: zsp(34),color: Color(0xFF343434)),), ), ), GestureDetector( onTap: (){ _showPayTypeAlert(); }, child: Container( height: hsp(88), width: wsp(300), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(50)), color: Color(0xFF007EFF) ), alignment: Alignment.center, child: Text('去付款',style: TextStyle(fontSize: zsp(34),color: Colors.white),), ), ) ], ), ) ], ):Container(), ); } _getCourseDetailData() async{ Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/orderDetails',parameter: {'orderSn':widget.orderStr},isLoading: true,isToken: true); if(dict!=null){ setState(() { _courseDict = dict['data']; }); } } _postCancelOrderData() async{ Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/cancelOrder',parameter: {'orderSn':widget.orderStr},isLoading: false,isToken: true); if(dict!=null){ Navigator.pop(context); } } _postPayData(String pass) async{ var dict = await ysRequestHttpEncrypt(context,type: requestType.post,api: '/app/applets/balance/balancePay', parameter: {'orderSn':widget.orderStr,'price':_courseDict['payPrice']!=null?_courseDict['payPrice']:_courseDict['price'],'password': pass},isLoading: true,isToken: true); if(dict!=null){ if(dict==''){ _getCourseDetailData(); }else if(dict['code']==804){ _showAlertView(1); }else if(dict['code']==801){ _showAlertView(2); } } } _showAlertView (int type) async{ showCupertinoDialog( context: context, builder: (context) { return CupertinoAlertDialog( title: Text('提示\n'), content: Text(type==1?'未设置支付密码':'余额不足请充值'), actions: [ CupertinoDialogAction(child: Text('取消'),onPressed: (){Navigator.pop(context);},), CupertinoDialogAction(child: Text(type==1?'去设置':'去充值'),onPressed: (){ Navigator.pop(context); Navigator.of(context,rootNavigator: true).push( CupertinoPageRoute( builder: (context){ return type==1?YSSetPayPass():YSMoney(); } ) ); },), ], ); } ); } _showPayTypeAlert(){ int _selected = 0; showModalBottomSheet( context: context, backgroundColor: Colors.transparent, isScrollControlled: true, builder: (context){ return StatefulBuilder( builder: (BuildContext context, StateSetter setState){ return Container( height: MediaQuery.of(context).size.height*0.4, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)) ), child: Column( children: [ Column( children: [ Container( height: hsp(100), padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container(width: hsp(50),), Text('支付方式',style: TextStyle(fontSize: zsp(32),fontWeight: FontWeight.bold,color: Colors.black),), Icon(Icons.close,size: hsp(50),color: Colors.black,) ], ), ), Divider(height: 1,thickness: 1,color: Color(0xFFF5F5F5),), ListView.separated( itemBuilder: (context,index){ return GestureDetector( onTap: (){ setState(() { _selected = index; }); }, behavior: HitTestBehavior.opaque, child: Container( height: hsp(92), color: Colors.white, padding: EdgeInsets.only(left: hsp(30),right: hsp(30)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Container( height: hsp(50), width: hsp(50), margin: EdgeInsets.only(right: hsp(25)), child: Image.asset(index==0?'lib/images/wexinLogo.png':index==1?'lib/images/aliLogo.png':'lib/images/wexinLogo.png'), ), Text(index==0?'余额':index==1?'微信支付':'支付宝',style: TextStyle(fontSize: zsp(30),color: Color(0xFF343434),)), ], ), Icon(Icons.check_circle,color:index==_selected?Color(0xFF007EFF):Colors.transparent,size: hsp(40),), ], ), ), ); }, separatorBuilder: (context,index){ return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),); }, itemCount: 3, padding: EdgeInsets.all(hsp(30)), physics: NeverScrollableScrollPhysics(), shrinkWrap: true, ) ], ), GestureDetector( onTap: (){ Navigator.pop(context); showDialog(context: context,builder: (context){ return AlertDialog( contentPadding: EdgeInsets.all(0), actionsPadding: EdgeInsets.all(0), buttonPadding: EdgeInsets.all(0), insetPadding: EdgeInsets.all(0), titlePadding: EdgeInsets.all(0), backgroundColor: Colors.transparent, content: ysPayKeybord(context,(value){ _postPayData(value); },_courseDict['title']!=null?'${_courseDict['title']}':'${_courseDict['setoutCity']} - ${_courseDict['arriveCity']} ${_courseDict['name']}','${_courseDict['payPrice']!=null?_courseDict['payPrice']:_courseDict['price']}') ); }); }, child: Container( height: hsp(100), decoration: BoxDecoration( color: Color(0xFF007EFF), borderRadius: BorderRadius.all(Radius.circular(5)) ), width: MediaQuery.of(context).size.width-hsp(60), margin: EdgeInsets.only(top: hsp(50)), alignment: Alignment.center, child: Text('确认支付',style: TextStyle(color: Colors.white,fontSize: zsp(34),fontWeight: FontWeight.bold),), ), ), ], ), ); }, ); } ); } }