123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643 |
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- import 'package:ysairplane/base/YSBase.dart';
- import 'package:ysairplane/tools/YSNetWorking.dart';
- import 'package:ysairplane/tools/YSPayKeybord.dart';
- import 'package:ysairplane/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<YSCourseDetail> {
- 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['consumed']==1?'待出行':'已完成',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(36),color: Colors.white),),
- Text(_courseDict['title']!=null?'${_courseDict['title']}':'${_courseDict['setoutCity']} - ${_courseDict['arriveCity']} ${_courseDict['name']}',
- style: TextStyle(fontSize: zsp(26),color: Colors.white),)
- ],
- ),
- )
- ],
- ),
- ),
- _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][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('2020年09月08日 12:34',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?'婚礼时间':'婚礼人数',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
- Text(index==0?'${_courseDict['setoutCity']}':index==1?'${_courseDict['time']}':'${_courseDict['personNum']}人',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
- ],
- ),
- );
- },
- separatorBuilder: (context,index){
- return Divider(color: Color(0xFFF5F5F5),height: 0.5,thickness: 0.5,);
- },
- itemCount: 3,
- 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?'救灾':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)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)),)
- ],
- ),
- ),
- 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['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(
- 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['']==1?'余额':_courseDict['']==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,
- padding: EdgeInsets.only(bottom: hsp(50)),
- shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
- )
- ],
- ),
- ),
- ),
- 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: <Widget>[
- 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: <Widget>[
- 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),),
- ),
- ),
- ],
- ),
- );
- },
- );
- }
- );
- }
- }
|