提交 a9a48cfe authored 作者: yueweilu's avatar yueweilu

更改 返回刷新方式

上级 0d02b31f
......@@ -20,12 +20,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
Widget build(BuildContext context) {
return GetBuilder<BookDetailController>(
init:BookDetailController(widget.bookId),
builder: (controller)=> WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
builder: (controller)=> Scaffold(
appBar: CustomAppBar(
backgroundColor: const Color(0xFFAB1941).withOpacity(0.02),
title: const Text('详情',style: TextStyle(fontSize: 17),),
......@@ -108,10 +103,10 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
);
buy.add(model);
final result = await context.pushNamed(Routes.bookPay,extra: buy);
if (result == true) {
context.pushNamed(Routes.bookPay,extra: buy).then((value) {
controller.getBookDetails();
}
});
}else{
final PopBackModel? backModel = await context.pushNamed(Routes.web,queryParameters: {'book_id': controller.bookDetails.bookId.toString(),'chapter_id': chapterModel.id.toString(),'chapter_name':chapterModel.name.toString(),'note_id':'0'},extra: controller.bookDetails);
if (backModel!.back == true){
......@@ -240,10 +235,10 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
);
buy.add(model);
final result = await context.pushNamed(Routes.bookPay,extra: buy);
if (result == true) {
context.pushNamed(Routes.bookPay,extra: buy).then((value){
controller.getBookDetails();
}
});
}
else{
final String chapterId = await controller.getCurrentChapterId();
......@@ -290,7 +285,6 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
),
),
),
),
);
}
......
......@@ -15,12 +15,7 @@ class _BookPayPageState extends State<BookPayPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<BookPayController>(
return GetBuilder<BookPayController>(
init: BookPayController(buy: widget.buy,context: context),
builder: (controller) => Stack(
children: [
......@@ -150,7 +145,6 @@ class _BookPayPageState extends State<BookPayPage> {
):const SizedBox()
],
)
),
);
}
......
......@@ -52,10 +52,9 @@ class BuildCounter extends StatelessWidget {
GestureDetector(
onTap: () async {
if (controller.num > 0){
final result = await context.pushNamed(Routes.bookPay,extra: controller.buy);
if (result == true) {
context.pushNamed(Routes.bookPay,extra: controller.buy).then((value){
controller.onRefresh();
}
});
}
},
child: Container(
......
......@@ -38,10 +38,9 @@ class _CoursePageState extends State<CoursePage> {
),
GestureDetector(
onTap: () async{
final result = await context.pushNamed(Routes.msgs);
if (result == true) {
context.pushNamed(Routes.msgs).then((value){
controller.getNums();
}
});
},
child: badges.Badge(
position: badges.BadgePosition.topEnd(top: -5.w, end: 0),
......@@ -112,10 +111,9 @@ class _CoursePageState extends State<CoursePage> {
onTapContinue: () async{
BookDetailModel bookDetails = await controller.getBookDetails(model.bookId.toString());
if(context.mounted){
final result = await context.pushNamed(Routes.web,queryParameters: {'book_id': bookDetails.bookId.toString(),'chapter_id': bookDetails.chapterId.toString(),'chapter_name':bookDetails.chapterName.toString()},extra:bookDetails);
if (result == true){
context.pushNamed(Routes.web,queryParameters: {'book_id': bookDetails.bookId.toString(),'chapter_id': bookDetails.chapterId.toString(),'chapter_name':bookDetails.chapterName.toString()},extra:bookDetails).then((value){
controller.getNums();
}
});
}
},
),
......
......@@ -7,12 +7,7 @@ class CreditPointsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop('111111');
return false;
},
child: GetBuilder<BookPayController>(
return GetBuilder<BookPayController>(
init: BookPayController(buy: [],context: context),
builder:(controller)=> Scaffold(
extendBodyBehindAppBar: true,
......@@ -148,7 +143,6 @@ class CreditPointsPage extends StatelessWidget {
],
)
),
),
);
}
}
......@@ -43,11 +43,9 @@ class _MinePageState extends State<MinePage> {
),
GestureDetector(
onTap: () async{
final result = await context.pushNamed(Routes.msgs);
print('---------------------------------1111$result');
if (result == true){
context.pushNamed(Routes.msgs).then((value) {
controller.getNums();
}
});
},
child: badges.Badge(
position: badges.BadgePosition.topEnd(top: -5.w, end: 0),
......@@ -78,20 +76,18 @@ class _MinePageState extends State<MinePage> {
Container(
margin: EdgeInsets.symmetric(horizontal: 10.w),
child: BuildUser(userInfo:controller.userInfo,onTap: () async{
final result = await context.pushNamed(Routes.userInfo,extra: controller.userInfo);
if (result == true){
context.pushNamed(Routes.userInfo,extra: controller.userInfo).then((value){
controller.getInfo();
}
});
},),
),
Gaps.vGaps10,
Container(
margin: EdgeInsets.symmetric(horizontal: 2.2.w),
child: BuildRead(items: controller.reads,onTap: (ReadModel model) async{
final result = await context.pushNamed(model.link??'');
if (result == true){
context.pushNamed(model.link??'').then((value){
controller.getInfo();
}
});
}),
),
controller.ads.isNotEmpty?Gaps.vGaps5:const SizedBox(),
......@@ -108,10 +104,9 @@ class _MinePageState extends State<MinePage> {
):const SizedBox(),
Gaps.vGaps15,
BuildAccount(items:controller.accounts,onTap: (ReadModel model) async{
final result = await context.pushNamed(model.link??'');
if (result == true){
context.pushNamed(model.link??'').then((value){
controller.getInfo();
}
});
},),
Gaps.vGaps10,
Container(
......@@ -134,10 +129,9 @@ class _MinePageState extends State<MinePage> {
children: [
GestureDetector(
onTap:() async {
final result = await context.pushNamed(Routes.security,extra: controller.userInfo);
if (result == true){
context.pushNamed(Routes.security,extra: controller.userInfo).then((value){
controller.getInfo();
}
});
}, child: _buildItem('账户安全')
),
Container(color: Colours.cLine,margin: EdgeInsets.symmetric(horizontal: 15.w),height: 1.w,),
......
......@@ -10,12 +10,7 @@ class UserCoinPage extends StatefulWidget {
class _UserCoinPageState extends State<UserCoinPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserCoinController>(
return GetBuilder<UserCoinController>(
init: UserCoinController(),
builder: (controller) => Scaffold(
appBar: CustomAppBar(
......@@ -77,7 +72,6 @@ class _UserCoinPageState extends State<UserCoinPage> {
),
),
),
),
);
}
}
......@@ -11,12 +11,7 @@ class UserCouponPage extends StatefulWidget {
class _UserCouponPageState extends State<UserCouponPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserCouponController>(
return GetBuilder<UserCouponController>(
init: UserCouponController(),
builder:(controller) => Scaffold(
appBar: AppBar(
......@@ -63,7 +58,6 @@ class _UserCouponPageState extends State<UserCouponPage> {
),
),
),
),
);
}
}
......@@ -10,12 +10,7 @@ class UserDiscussPage extends StatefulWidget {
class _UserDiscussPageState extends State<UserDiscussPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserDiscussController>(
return GetBuilder<UserDiscussController>(
init: UserDiscussController(),
builder:(controller)=> Scaffold(
appBar: AppBar(
......@@ -50,7 +45,6 @@ class _UserDiscussPageState extends State<UserDiscussPage> {
],
),
),
),
);
}
}
......@@ -20,12 +20,7 @@ class _UserGenderPageState extends State<UserGenderPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserGenderController>(
return GetBuilder<UserGenderController>(
init: UserGenderController(widget.userInfo),
builder: (controller) => Scaffold(
appBar: CustomAppBar(
......@@ -213,7 +208,6 @@ class _UserGenderPageState extends State<UserGenderPage> {
),
),
))
),
);
}
......
......@@ -10,12 +10,7 @@ class UserLovePage extends StatefulWidget {
class _UserLovePageState extends State<UserLovePage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserLoveController>(
return GetBuilder<UserLoveController>(
init: UserLoveController(),
builder:(controller) => Scaffold(
appBar: AppBar(
......@@ -61,7 +56,6 @@ class _UserLovePageState extends State<UserLovePage> {
),
),
),
),
);
}
}
......@@ -7,12 +7,7 @@ class MsgPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<MsgController>(
return GetBuilder<MsgController>(
init: MsgController(),
builder:(controller) => Scaffold(
appBar: AppBar(
......@@ -54,64 +49,45 @@ class MsgPage extends StatelessWidget {
if (orderInfo.status == 1){
// 书籍订单
if (orderInfo.types ==1){
final result = await context.pushNamed(Routes.orderAwaiting,
context.pushNamed(Routes.orderAwaiting,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
if (result == true){
// controller.onRefresh();
}
}
// 充值订单
else {
final result = await context.pushNamed(Routes.orderCoinAwaiting,
context.pushNamed(Routes.orderCoinAwaiting,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
if (result == true){
// controller.onRefresh();
}
}
}
// 已取消
else if (orderInfo.status ==2){
if (orderInfo.types == 1){
final result = await context.pushNamed(Routes.orderCancel,
context.pushNamed(Routes.orderCancel,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
if (result == true){
// controller.onRefresh();
}
}
else {
final result = await context.pushNamed(Routes.orderCoinCancel,
context.pushNamed(Routes.orderCoinCancel,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
if (result == true){
// controller.onRefresh();
}
}
}
// 已完成
else if (orderInfo.status ==3){
if (orderInfo.types == 1){
final result = await context.pushNamed(Routes.orderCompleted,
context.pushNamed(Routes.orderCompleted,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
if (result == true){
// controller.onRefresh();
}
}
else {
final result = await context.pushNamed(Routes.orderCoinCompleted,
context.pushNamed(Routes.orderCoinCompleted,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
if (result == true){
// controller.onRefresh();
}
}
}
// 已退款
else if (orderInfo.status == 4){
if (orderInfo.types == 1){
final result = await context.pushNamed(Routes.orderRefunded,
context.pushNamed(Routes.orderRefunded,
queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
if (result == true){
// controller.onRefresh();
}
}
}
......@@ -120,13 +96,9 @@ class MsgPage extends StatelessWidget {
// 2 购买完成三天未评价(跳转订单列表--已完成)
final orderInfo = await controller.getOrderInfo(model.urlId?.orderNum??'');
final result = await context.pushNamed(Routes.orderEvaluate,extra:orderInfo,
context.pushNamed(Routes.orderEvaluate,extra:orderInfo,
queryParameters: {'orderNum':orderInfo.ordersnum});
// final result = await context.pushNamed(Routes.order);
// if (result == true){
// // controller.onRefresh();
// }
///TODO:
}else if (model.type == 3){
// 3 讨论有人回复的时候 (跳转我的讨论详情也)
......@@ -145,17 +117,11 @@ class MsgPage extends StatelessWidget {
}
else if (model.type == 4){
// 4 订单完成后有新的积分增加(跳转用户积分记录页)
final result = await context.pushNamed(Routes.point);
if (result == true){
// controller.onRefresh();
}
context.pushNamed(Routes.point);
}else if (model.type == 5){
// 5后台直接发放给指定用户优惠券(跳转到用户优惠券页)
final result = await context.pushNamed(Routes.coupon);
if (result == true){
// controller.onRefresh();
}
context.pushNamed(Routes.coupon);
}
},
......@@ -166,7 +132,6 @@ class MsgPage extends StatelessWidget {
),
),
),
),
);
}
......
......@@ -10,12 +10,7 @@ class UserNotePage extends StatefulWidget {
class _UserNotePageState extends State<UserNotePage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserNoteController>(
return GetBuilder<UserNoteController>(
init: UserNoteController(),
builder:(controller)=> Scaffold(
appBar: AppBar(
......@@ -55,7 +50,6 @@ class _UserNotePageState extends State<UserNotePage> {
],
),
),
),
);
}
}
......@@ -22,12 +22,7 @@ class _UserNotesDesPageState extends State<UserNotesDesPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text('笔记详情'),
......@@ -72,7 +67,6 @@ class _UserNotesDesPageState extends State<UserNotesDesPage> {
],
)
),
),
);
}
}
......@@ -43,12 +43,7 @@ class _UserOrderState extends State<UserOrderPage>
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
return Scaffold(
appBar: AppBar(
title: Container(
padding: EdgeInsets.only(right: 10.w),
......@@ -65,7 +60,6 @@ class _UserOrderState extends State<UserOrderPage>
titleSpacing: 0,
),
body: _buildBody(),
),
);
}
......
......@@ -12,10 +12,10 @@ class BuiltAwaiting extends StatelessWidget {
Widget build(BuildContext context) {
return GestureDetector(
onTap: () async {
final result = await context.pushNamed(Routes.orderAwaiting,
queryParameters: {'orderNum': model.ordersnum});
if (result == true) {
controller.onRefresh(); }
context.pushNamed(Routes.orderAwaiting,
queryParameters: {'orderNum': model.ordersnum}).then((value){
controller.onRefresh();
});
},
child: Container(
margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
......
......@@ -18,25 +18,22 @@ class BuiltCoin extends StatelessWidget {
return GestureDetector(
onTap: () async {
if(model.status == 1){
final result = await context.pushNamed(Routes.orderCoinAwaiting,
queryParameters: {'orderNum': model.ordersnum});
if(result==true){
context.pushNamed(Routes.orderCoinAwaiting,
queryParameters: {'orderNum': model.ordersnum}).then((value){
controller.onRefresh();
}
});
}
else if(model.status == 2){
final result = await context.pushNamed(Routes.orderCoinCancel,
queryParameters: {'orderNum': model.ordersnum});
if(result==true){
context.pushNamed(Routes.orderCoinCancel,
queryParameters: {'orderNum': model.ordersnum}).then((value){
controller.onRefresh();
}
});
}
else if(model.status == 3){
final result = await context.pushNamed(Routes.orderCoinCompleted,
queryParameters: {'orderNum': model.ordersnum});
if(result==true){
context.pushNamed(Routes.orderCoinCompleted,
queryParameters: {'orderNum': model.ordersnum}).then((value){
controller.onRefresh();
}
});
}
},
child: Container(
......
......@@ -15,10 +15,10 @@ class BuiltCompleted extends StatelessWidget {
return GestureDetector(
onTap: ()
async {
final result = await context.pushNamed(Routes.orderCompleted,
queryParameters: {'orderNum': model.ordersnum});
if (result == true) {
controller.onRefresh(); }
context.pushNamed(Routes.orderCompleted,
queryParameters: {'orderNum': model.ordersnum}).then((value){
controller.onRefresh();
});
},
child: Container(
margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
......@@ -165,14 +165,13 @@ class BuiltCompleted extends StatelessWidget {
child: Center(
child: GestureDetector(
onTap: () async {
final result = await context.pushNamed(Routes.orderEvaluate,
context.pushNamed(Routes.orderEvaluate,
extra: OrderInfoModel(),
queryParameters: {
'orderNum': model.ordersnum
});
if (result == true) {
}).then((value){
controller.onRefresh();
}
});
},
child: Text(
judgeComments() == 1 ? '去评价' : "继续评价",
......@@ -307,14 +306,14 @@ class BuiltCompleted extends StatelessWidget {
child: Center(
child: GestureDetector(
onTap: () async {
final result = await context.pushNamed(Routes.orderEvaluate,
context.pushNamed(Routes.orderEvaluate,
extra: OrderInfoModel(),
queryParameters: {
'orderNum': model.ordersnum
});
if (result == true) {
}).then((value){
controller.onRefresh();
}
});
},
child: Text(
judgeComments() == 1 ? '去评价' : "继续评价",
......
......@@ -21,12 +21,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: FutureBuilder(
return FutureBuilder(
future: myController.getOrderInfo(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
......@@ -37,12 +32,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
),
);
} else {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
return Scaffold(
appBar: CustomAppBar(
title: const Text('等待付款'),
actions: [],
......@@ -309,11 +299,9 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
),
],
),
),
);
}
},
),
);
}
}
......@@ -12,12 +12,7 @@ class UserOrderCancelDetailPage extends StatefulWidget {
class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserOrderCancelDetailController>(
return GetBuilder<UserOrderCancelDetailController>(
init: UserOrderCancelDetailController(widget.orderNum),
builder: (controller) => Scaffold(
appBar: CustomAppBar(
......@@ -238,7 +233,6 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
// ),
// )
],),
)),
);
));
}
}
......@@ -23,12 +23,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: FutureBuilder(
return FutureBuilder(
future: myController.getOrderInfo(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
......@@ -39,12 +34,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
),
);
} else {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
return Scaffold(
appBar: CustomAppBar(
title: const Text('待支付'),
actions: [],
......@@ -318,11 +308,9 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
),
],
),
),
);
}
},
),
);
}
}
......@@ -23,12 +23,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: FutureBuilder(
return FutureBuilder(
future: myController.getOrderInfo(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
......@@ -39,12 +34,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> {
),
);
} else {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
return Scaffold(
appBar: CustomAppBar(
title: const Text('已取消'),
actions: [],
......@@ -183,11 +173,9 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> {
),
],
),
),
);
}
},
),
);
}
}
......@@ -23,12 +23,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: FutureBuilder(
return FutureBuilder(
future: myController.getOrderInfo(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
......@@ -39,12 +34,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> {
),
);
} else {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
return Scaffold(
appBar: CustomAppBar(
title: const Text('已完成'),
actions: [],
......@@ -183,11 +173,9 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> {
),
],
),
),
);
}
},
),
);
}
}
......@@ -19,12 +19,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserOrderCompletedController>(
return GetBuilder<UserOrderCompletedController>(
init: UserOrderCompletedController(widget.orderNum),
builder: (controller) => Scaffold(
appBar: CustomAppBar(
......@@ -224,9 +219,9 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
child: GestureDetector(
onTap: () async {
final result = await context.pushNamed(Routes.orderEvaluate,extra:controller.model,
queryParameters: {'orderNum':controller.model.ordersnum});
if (result == true) {
controller.getOrderInfo(); }
queryParameters: {'orderNum':controller.model.ordersnum}).then((value){
controller.getOrderInfo();
});
},
child: Text(controller.judgeComments() ==1?'去评价':"继续评价",
style: TextStyle(
......@@ -244,7 +239,6 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
],
),
),
))),
);
)));
}
}
......@@ -29,12 +29,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
@override
Widget build(BuildContext context) {
// super.build(context);
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child:GetBuilder<UserOrderEvaluateController>(
return GetBuilder<UserOrderEvaluateController>(
init: UserOrderEvaluateController(widget.orderNum),
builder: (controller) => Scaffold(
appBar: AppBar(
......@@ -95,7 +90,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
],
),
),
),),);
),);
}
Widget listItem(BookListModel bookListModel,int index,UserOrderEvaluateController myController) {
......
......@@ -12,12 +12,7 @@ class UserOrderRefundedPage extends StatefulWidget {
class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserOrderCRefundedController>(
return GetBuilder<UserOrderCRefundedController>(
init: UserOrderCRefundedController(widget.orderNum),
builder: (controller) => Scaffold(
appBar: CustomAppBar(
......@@ -238,7 +233,6 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
),
)
],),
)),
);
));
}
}
......@@ -10,12 +10,7 @@ class UserPointPage extends StatefulWidget {
class _UserPointPageState extends State<UserPointPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserPointController>(
return GetBuilder<UserPointController>(
init: UserPointController(),
builder: (controller) => Scaffold(
appBar: AppBar(
......@@ -59,7 +54,6 @@ class _UserPointPageState extends State<UserPointPage> {
),
),
),
),
);
}
}
......@@ -12,12 +12,7 @@ class UserSecurityPage extends StatefulWidget {
class _UserSecurityPageState extends State<UserSecurityPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text('账号安全'),
......@@ -185,7 +180,6 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
)
],
),
),
);
}
......
......@@ -10,12 +10,7 @@ class UserWrongPage extends StatefulWidget {
class _UserWrongPageState extends State<UserWrongPage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: GetBuilder<UserWrongController>(
return GetBuilder<UserWrongController>(
init: UserWrongController(),
builder:(controller)=> Scaffold(
appBar: AppBar(
......@@ -50,7 +45,6 @@ class _UserWrongPageState extends State<UserWrongPage> {
],
),
),
),
);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论