提交 b0c5b2ee authored 作者: maodou's avatar maodou

1:修复订单列表点击查看详情与列表项不一致问题

2:修复订单列表进入后数据请求多次的问题 3:弹窗可点击区域扩大
上级 7a9c606e
......@@ -164,6 +164,11 @@ class OrderListModel {
}
return map;
}
@override
String toString() {
return 'OrderListModel{id: $id, ordersnum: $ordersnum, totalPrice: $totalPrice, finalTotalPrice: $finalTotalPrice, num_: $num_, status: $status, payType: $payType, types: $types, createTime: $createTime, cartList: $cartList}';
}
}
/// 书籍列表
......
......@@ -195,26 +195,26 @@ class _LoginPageState extends State<LoginPage> {
child: Row(
children: [
SizedBox(
width: 10.w,
height: 10.w,
width: 14.w,
height: 14.w,
// color: AppTheme.primary,
child: Image.asset(
controller.agree?'assets/images/check_box_select.png':'assets/images/uncheck.png',
),
),
Gaps.hGaps5,
Text('我已阅读并同意',style: TextStyle(color: Colours.c9,fontSize:10.w,height: 1.4)),
Text('我已阅读并同意',style: TextStyle(color: Colours.c9,fontSize:14.w,height: 1.4)),
],
),
),
GestureDetector(
child: Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:10.w,height: 1.4)),
child: Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)),
onTap: (){
context.pushNamed(Routes.terms);
},
),
GestureDetector(
child: Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:10.w,height: 1.4)),
child: Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)),
onTap: (){
context.pushNamed(Routes.terms);
},
......
......@@ -29,16 +29,9 @@ class UserOrderController extends GetxController
int _page = 1;
bool _noMore = false;
@override
void onInit() {
super.onInit();
}
@override
void onReady() {
onRefresh();
// onRefresh();
super.onReady();
}
......@@ -68,6 +61,7 @@ class UserOrderController extends GetxController
void onRefresh() async {
try {
await _getOrders(isRefresh:true);
refreshController.finishRefresh(IndicatorResult.success);
refreshController.resetFooter();
} catch (error) {
......
......@@ -2,10 +2,10 @@ part of user_order_awaiting;
/// 等待付款订单
class UserOrderAwaitingController extends GetxController {
final String orderNum;
late String _orderNum;
final BuildContext context;
UserOrderAwaitingController(this.orderNum,this.context); // 订单编号
UserOrderAwaitingController(this.context); // 订单编号
late OrderInfoModel model;
// 应付款、订单编号等
......@@ -18,6 +18,12 @@ class UserOrderAwaitingController extends GetxController {
late PayOrderModel payOrderModel;
String get orderNum => _orderNum; // 获取订单编号的方法
// 更新订单编号的方法
void updateOrderNum(String newOrderNum) {
_orderNum = newOrderNum;
}
@override
void onReady() {
......
......@@ -13,7 +13,8 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
@override
void initState() {
myController = Get.put(UserOrderAwaitingController(widget.orderNum,context));
myController = Get.put(UserOrderAwaitingController(context));
myController.updateOrderNum(widget.orderNum);
super.initState();
}
......@@ -33,254 +34,267 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
context.pop(true);
return false;
},
child: GetBuilder<UserOrderAwaitingController>(
init: UserOrderAwaitingController(widget.orderNum,context),
builder: (controller) => Scaffold(
appBar: CustomAppBar(
title: const Text('等待付款'),
actions: [],
),
body: Column(
child: Scaffold(
appBar: CustomAppBar(
title: const Text('等待付款'),
actions: [],
),
body: Column(
children: [
Container(
margin: EdgeInsets.symmetric(
horizontal: AppTheme.margin,
vertical: AppTheme.margin),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colours.cC7.withOpacity(0.5),
offset: Offset(3.w, 0),
blurRadius: 10.w,
spreadRadius: 0.w,
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: EdgeInsets.symmetric(
horizontal: AppTheme.margin,
vertical: AppTheme.margin),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colours.cC7.withOpacity(0.5),
offset: Offset(3.w, 0),
blurRadius: 10.w,
spreadRadius: 0.w,
Padding(
padding: EdgeInsets.only(
left: 12.0.w, top: 12.0.w, bottom: 12.0.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
myController.model?.bookList?[0].img??'',
fit: BoxFit.cover, // 设置适应方式为充满
width: 72.0.w,
height: 86.0.w,
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
Expanded(
child: Padding(
padding: EdgeInsets.only(
left: 12.0.w, top: 12.0.w, bottom: 12.0.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
left: 12.0.w,
top: 5.5.w,
right: 23.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.end, // 下面的Text靠左
children: [
Image.network(
controller.model?.bookList?[0].img??'',
fit: BoxFit.cover, // 设置适应方式为充满
width: 72.0.w,
height: 86.0.w,
Text(
myController.model.bookList?[0].name??'',
style: TextStyle(
color: Colours.c3,
fontWeight: Fonts.bold,
fontSize: 13.w,
),
maxLines: 2,
overflow: TextOverflow
.ellipsis, // 超过部分显示省略号
),
Expanded(
child: Padding(
padding: EdgeInsets.only(
left: 12.0.w,
top: 5.5.w,
right: 23.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.end, // 下面的Text靠左
children: [
Text(
controller.model.bookList?[0].name??'',
style: TextStyle(
color: Colours.c3,
fontWeight: Fonts.bold,
fontSize: 13.w,
),
maxLines: 2,
overflow: TextOverflow
.ellipsis, // 超过部分显示省略号
),
SizedBox(height: 25.5.w),
Text(
"需付款 ¥${controller.model.finalTotalPrice}",
style: TextStyle(
color: Colours.cAB1941,
fontWeight: Fonts.bold,
fontSize: 14.w,
),
),
],
),
SizedBox(height: 25.5.w),
Text(
"需付款 ¥${myController.model.finalTotalPrice}",
style: TextStyle(
color: Colours.cAB1941,
fontWeight: Fonts.bold,
fontSize: 14.w,
),
),
],
),
),
Container(
color: Colours.cLine,
margin: EdgeInsets.only(
left: 10.w, right: 10.w, bottom: 12.w),
height: 1.w,
),
Container(
padding: EdgeInsets.only(
left: 11.5.w, bottom: 8.w, right: 23.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children:
controller.orderAwaitings.map((model) {
return Padding(
padding: EdgeInsets.only(top: 12.w),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
model.name,
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c9),
),
Text(
model.value.toString(),
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c3),
),
],
),
);
}).toList(),
),
),
SizedBox(
height: 13.5.w,
),
],
),
),
],
),
),
SizedBox(
height: 39.w,
Container(
color: Colours.cLine,
margin: EdgeInsets.only(
left: 10.w, right: 10.w, bottom: 12.w),
height: 1.w,
),
GestureDetector(
onTap: (){
controller.payOrder();
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 15.w),
height: 40.w,
decoration: BoxDecoration(
color: AppTheme.primary,
borderRadius: BorderRadius.circular(180.w),
border:
Border.all(color: Colours.cC31F4C, width: 0.5.w)),
child: Center(
child: Text(
'立即支付 ¥${controller.model.finalTotalPrice}',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 14.w,
color: Colours.cFF),
),
),
Container(
padding: EdgeInsets.only(
left: 11.5.w, bottom: 8.w, right: 23.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children:
myController.orderAwaitings.map((model) {
return Padding(
padding: EdgeInsets.only(top: 12.w),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
model.name,
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c9),
),
Text(
model.value.toString(),
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c3),
),
],
),
);
}).toList(),
),
),
SizedBox(
height: 11.5.w,
height: 13.5.w,
),
GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0.w),
],
),
),
),
SizedBox(
height: 39.w,
),
GestureDetector(
onTap: (){
myController.payOrder();
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 15.w),
height: 40.w,
decoration: BoxDecoration(
color: AppTheme.primary,
borderRadius: BorderRadius.circular(180.w),
border:
Border.all(color: Colours.cC31F4C, width: 0.5.w)),
child: Center(
child: Text(
'立即支付 ¥${myController.model.finalTotalPrice}',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 14.w,
color: Colours.cFF),
),
),
),
),
SizedBox(
height: 11.5.w,
),
GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0.w),
),
contentPadding: EdgeInsets.zero, // 移除内容部分的内边距
content: Wrap(children: [
Container(
margin: EdgeInsets.only(top: 44.w, bottom: 29.w), // 调整上下间距
child: Center(
child: Text(
'确定取消订单吗',
style: TextStyle(
fontSize: 15.w,
fontWeight: Fonts.medium,
color: Colours.c3,
),
contentPadding: EdgeInsets.zero, // 移除内容部分的内边距
content: Wrap(children: [
Container(
margin: EdgeInsets.only(top: 44.w, bottom: 29.w), // 调整上下间距
child: Center(
child: Text(
'确定取消订单吗',
style: TextStyle(
fontSize: 15.w,
fontWeight: Fonts.medium,
color: Colours.c3,
),
),
),
),
),
Container(
height: 1.w, // 设置分割线的高度
width: double.infinity, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
],),
// 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero,
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // 或者使用MainAxisAlignment.spaceEvenly
children: [
GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'取消',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.c6,
),
),
Container(
height: 1.w, // 设置分割线的高度
width: double.infinity, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
],),
// 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero,
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // 或者使用MainAxisAlignment.spaceEvenly
children: [
GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: const Text(
'取消',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.c6,
),
),
),
Container(
height: 39.5.w, // 设置分割线的高度
width: 1, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
GestureDetector(
onTap: () {
controller.cancelPay();
Navigator.of(context).pop();
Navigator.pop(context);
},
child: const Text(
'确定',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.cAB1941,
),
),
),
],
),
),
Container(
height: 39.5.w, // 设置分割线的高度
width: 1, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
GestureDetector(
onTap: () {
myController.cancelPay();
Navigator.of(context).pop();
Navigator.pop(context);
},
child: Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'确定',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.cAB1941,
),
),
],
);
},
);
},
child: Text(
'取消订单',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 15.w,
color: Colours.c9,
),
),
],
),
),
),
],
],
);
},
);
},
child: Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'取消订单',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 15,
color: Colours.c9,
),
),
)),
); ;
),
),
],
),
),
);
}
......
......@@ -2,10 +2,14 @@ part of user_order_coin_awaiting;
/// 紫荆币等待付款订单
class UserOrderCoinAwaitingController extends GetxController {
final String orderNum;
UserOrderCoinAwaitingController(this.orderNum); // 订单编号
late String _orderNum;
String get orderNum => _orderNum; // 获取订单编号的方法
UserOrderCoinAwaitingController();
// 更新订单编号的方法
void updateOrderNum(String newOrderNum) {
_orderNum = newOrderNum;
}
late OrderInfoModel model;
// 应付款、订单编号等
List<OrderCompletedModel> orderAwaitings = [];
......@@ -33,9 +37,6 @@ class UserOrderCoinAwaitingController extends GetxController {
}
}
/// 获取订单信息
Future<void> getOrderInfo() async {
model = await MineAPI.getOrderInfo(orderNum: orderNum);
......@@ -91,7 +92,6 @@ class UserOrderCoinAwaitingController extends GetxController {
// 支付宝支付
void requestAliPay(){
print('================================================================${payOrderModel.encryptionOrder!}');
tobias.pay(payOrderModel.encryptionOrder!).then((payResult){
if (payResult['resultStatus'] == '9000') {
......
......@@ -16,7 +16,8 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
@override
void initState() {
myController = Get.put(UserOrderCoinAwaitingController(widget.orderNum));
myController = Get.put(UserOrderCoinAwaitingController());
myController.updateOrderNum(widget.orderNum);
super.initState();
}
......@@ -38,266 +39,279 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
context.pop(true);
return false;
},
child: GetBuilder<UserOrderCoinAwaitingController>(
init: UserOrderCoinAwaitingController(widget.orderNum),
builder: (controller) => Scaffold(
appBar: CustomAppBar(
title: const Text('待支付'),
actions: [],
),
body: Column(
child: Scaffold(
appBar: CustomAppBar(
title: const Text('待支付'),
actions: [],
),
body: Column(
children: [
Container(
margin: EdgeInsets.symmetric(
horizontal: AppTheme.margin,
vertical: AppTheme.margin),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colours.cC7.withOpacity(0.5),
offset: Offset(3.w, 0),
blurRadius: 10.w,
spreadRadius: 0.w,
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: EdgeInsets.symmetric(
horizontal: AppTheme.margin,
vertical: AppTheme.margin),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colours.cC7.withOpacity(0.5),
offset: Offset(3.w, 0),
blurRadius: 10.w,
spreadRadius: 0.w,
Padding(
padding: EdgeInsets.only(
left: 12.0.w,
top: 17.5.w,
bottom: 12.0.w),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Image.asset(
'assets/images/coin.png',
// fit: BoxFit.cover, // 设置适应方式为充满
width: 42.0.w,
height: 42.0.w,
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.only(
left: 12.0.w,
top: 17.5.w,
bottom: 12.0.w),
child: Row(
Expanded(
child: Padding(
padding:
EdgeInsets.only(right: 16.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.end,
// 下面的Text靠左
children: [
Image.asset(
'assets/images/coin.png',
// fit: BoxFit.cover, // 设置适应方式为充满
width: 42.0.w,
height: 42.0.w,
Text(
'充值${myController.model.bean}紫荆币',
style: TextStyle(
color: Colours.c3,
fontWeight: Fonts.bold,
fontSize: 13.w,
),
maxLines: 2,
overflow: TextOverflow
.ellipsis, // 超过部分显示省略号
),
Expanded(
child: Padding(
padding:
EdgeInsets.only(right: 16.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.end,
// 下面的Text靠左
children: [
Text(
'充值${controller.model.bean}紫荆币',
style: TextStyle(
color: Colours.c3,
fontWeight: Fonts.bold,
fontSize: 13.w,
),
maxLines: 2,
overflow: TextOverflow
.ellipsis, // 超过部分显示省略号
),
SizedBox(height: 9.w),
Text(
"需付款 ¥${controller.model.finalTotalPrice}",
style: TextStyle(
color: Colours.cAB1941,
fontWeight: Fonts.bold,
fontSize: 14.w,
),
),
],
),
SizedBox(height: 9.w),
Text(
"需付款 ¥${myController.model.finalTotalPrice}",
style: TextStyle(
color: Colours.cAB1941,
fontWeight: Fonts.bold,
fontSize: 14.w,
),
),
],
),
),
Container(
color: Colours.cLine,
margin: EdgeInsets.only(
left: 10.w, right: 10.w, bottom: 12.w),
height: 1.w,
),
Container(
padding: EdgeInsets.only(
left: 11.5.w,
bottom: 8.w,
right: 23.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: controller.orderAwaitings
.map((model) {
return Padding(
padding: EdgeInsets.only(top: 12.w),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
model.name,
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c9),
),
Text(
model.value.toString(),
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c3),
),
],
),
);
}).toList(),
),
),
SizedBox(
height: 13.5.w,
),
],
),
),
],
),
),
SizedBox(
height: 11.5.w,
Container(
color: Colours.cLine,
margin: EdgeInsets.only(
left: 10.w, right: 10.w, bottom: 12.w),
height: 1.w,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 15.w),
height: 40.w,
decoration: BoxDecoration(
color: AppTheme.primary,
borderRadius: BorderRadius.circular(180.w),
border: Border.all(
color: Colours.cC31F4C, width: 0.5.w)),
child: Center(
child: GestureDetector(
onTap: () {
// print("保存昵称");
// context.pushNamed(Routes.orderEvaluate);
},
child: Text(
'立即支付 ¥${controller.model.finalTotalPrice}',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 14.w,
color: Colours.cFF),
)),
padding: EdgeInsets.only(
left: 11.5.w,
bottom: 8.w,
right: 23.5.w),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: myController.orderAwaitings
.map((model) {
return Padding(
padding: EdgeInsets.only(top: 12.w),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
model.name,
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c9),
),
Text(
model.value.toString(),
style: TextStyle(
fontSize: 13.w,
height: 1.6.w,
color: Colours.c3),
),
],
),
);
}).toList(),
),
),
SizedBox(
height: 11.5.w,
height: 13.5.w,
),
GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(8.0.w),
],
),
),
),
SizedBox(
height: 11.5.w,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 15.w),
height: 40.w,
decoration: BoxDecoration(
color: AppTheme.primary,
borderRadius: BorderRadius.circular(180.w),
border: Border.all(
color: Colours.cC31F4C, width: 0.5.w)),
child: Center(
child: GestureDetector(
onTap: () {
// print("保存昵称");
// context.pushNamed(Routes.orderEvaluate);
},
child: Text(
'立即支付 ¥${myController.model.finalTotalPrice}',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 14.w,
color: Colours.cFF),
)),
),
),
SizedBox(
height: 11.5.w,
),
GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(8.0.w),
),
contentPadding: EdgeInsets.zero,
// 移除内容部分的内边距
content: Wrap(
children: [
Container(
margin: EdgeInsets.only(
top: 44.w,
bottom: 29.w), // 调整上下间距
child: Center(
child: Text(
'确定取消订单吗',
style: TextStyle(
fontSize: 15.w,
fontWeight: Fonts.medium,
color: Colours.c3,
),
),
contentPadding: EdgeInsets.zero,
// 移除内容部分的内边距
content: Wrap(
children: [
Container(
margin: EdgeInsets.only(
top: 44.w,
bottom: 29.w), // 调整上下间距
child: Center(
child: Text(
'确定取消订单吗',
style: TextStyle(
fontSize: 15.w,
fontWeight: Fonts.medium,
color: Colours.c3,
),
),
),
),
Container(
height: 1.w, // 设置分割线的高度
width: double.infinity, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
),
Container(
height: 1.w, // 设置分割线的高度
width: double.infinity, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
],
),
// 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero,
actions: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
// 或者使用MainAxisAlignment.spaceEvenly
children: [
GestureDetector(
onTap: () =>
Navigator.of(context).pop(),
child:Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'取消',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.c6,
),
],
),
),
// 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero,
actions: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
// 或者使用MainAxisAlignment.spaceEvenly
children: [
GestureDetector(
onTap: () =>
Navigator.of(context).pop(),
child: const Text(
'取消',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.c6,
),
),
),
Container(
height: 39.5.w, // 设置分割线的高度
width: 1, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
GestureDetector(
onTap: () {
controller.cancelPay();
Navigator.of(context).pop();
Navigator.pop(context);
},
child: const Text(
'确定',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.cAB1941,
),
),
),
],
),
Container(
height: 39.5.w, // 设置分割线的高度
width: 1, // 设置分割线的宽度
color: Colours.cLine, // 设置分割线的颜色
),
GestureDetector(
onTap: () {
myController.cancelPay();
Navigator.of(context).pop();
Navigator.pop(context);
},
child:Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'确定',
style: TextStyle(
fontSize: 12,
fontWeight: Fonts.medium,
color: Colours.cAB1941,
),
),
],
);
},
);
},
child: Text(
'取消订单',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 15.w,
color: Colours.c9,
),
),
],
),
),
),
],
],
);
},
);
},
child: Container(
width: 105.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'取消订单',
style: TextStyle(
fontWeight: Fonts.medium,
fontSize: 15,
color: Colours.c9,
),
),
)),
),
),
],
),
),
);
}
},
......
......@@ -259,11 +259,6 @@ class _UserSetPageState extends State<UserSetPage> {
// 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero,
actions: <Widget>[
Wrap(
children: [
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
......@@ -312,12 +307,18 @@ class _UserSetPageState extends State<UserSetPage> {
if (!forcedUpgrade)
Padding(padding: EdgeInsets.only(right: 28.w),
child: GestureDetector(
child: const Text(
'稍后再说',
style: TextStyle(
color: Colours.c6,
fontSize: 12,
fontWeight: Fonts.medium),
child:
Container(
width: 85.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'稍后再说',
style: TextStyle(
color: Colours.c6,
fontSize: 12,
fontWeight: Fonts.medium),
),
),
onTap: () => Navigator.of(context).pop(),
),),
......@@ -329,12 +330,17 @@ class _UserSetPageState extends State<UserSetPage> {
),
Padding(padding: EdgeInsets.only(left: 28.w),
child: GestureDetector(
child: const Text(
'立即更新',
style: TextStyle(
color: Colours.cAB1941,
fontSize: 12,
fontWeight: Fonts.medium),
child: Container(
width: 85.w,
color: Colours.cFF,
alignment: Alignment.center,
child: const Text(
'立即更新',
style: TextStyle(
color: Colours.cAB1941,
fontSize: 12,
fontWeight: Fonts.medium),
),
),
onTap: () {
_appUpdate();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论