From a531c26d740e12d1f7259456d8fe3a803a7564a6 Mon Sep 17 00:00:00 2001 From: wylyl22 <2373073266@qq.com> Date: Wed, 7 Sep 2022 13:48:29 +0800 Subject: [PATCH] 111 --- lib/ui/user/user_page.dart | 1 + lib/ui/widget/appdialog.dart | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/ui/user/user_page.dart b/lib/ui/user/user_page.dart index d1b6223..70b262d 100644 --- a/lib/ui/user/user_page.dart +++ b/lib/ui/user/user_page.dart @@ -189,6 +189,7 @@ class _UserPageState extends State { children: [ GestureDetector( onTap: () { + if (!userProvider.isLogin) { Get.to(() => const LoginPage()); } diff --git a/lib/ui/widget/appdialog.dart b/lib/ui/widget/appdialog.dart index 5a61972..35d9b26 100644 --- a/lib/ui/widget/appdialog.dart +++ b/lib/ui/widget/appdialog.dart @@ -24,14 +24,12 @@ class AppDialog extends Dialog { @override Widget build(BuildContext context) { return Container( - - margin:EdgeInsets.only(left: 95.w,top: 452.w), - - - // EdgeInsets.symmetric(horizontal: 95.w,vertical: 452.w), + margin: EdgeInsets.symmetric(horizontal: 95.w, vertical: 452.w), decoration: BoxDecoration( - image: - DecorationImage(image: AssetImage(Assets.images.bouncedbg.path,))), + image: DecorationImage( + image: AssetImage( + Assets.images.bouncedbg.path, + ))), child: Column( children: [ 32.hb, @@ -99,22 +97,22 @@ class AppDialog extends Dialog { _getBotton(String bContent, context) { return GestureDetector( - onTap: () async{ - var res=await apiClient.request(API.app.trialVip); - if(res.code==0){ + onTap: () async { + var res = await apiClient.request(API.app.trialVip); + if (res.code == 0) { // showDialog(context: context, builder: (context){ // return const AppDialog(); // }); CloudToast.show(res.msg); // BoxShadow.show(res.msg); - } else{ + } else { CloudToast.show(res.msg); Navigator.pop(context); } }, child: Container( margin: EdgeInsets.symmetric(horizontal: 64.w), - padding: EdgeInsets.symmetric(horizontal: 155.w,vertical: 28.w), + padding: EdgeInsets.symmetric(horizontal: 155.w, vertical: 28.w), height: 88.w, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12.w), @@ -124,7 +122,7 @@ _getBotton(String bContent, context) { begin: Alignment.centerRight)), child: Text( bContent, - style: TextStyle(fontSize: 28.sp,fontWeight:FontWeight.bold), + style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.bold), ), ), );