Browse Source

管理系统首页侧面弹窗更改

wr_2023_business
wurong 2 years ago
parent
commit
e1b0200952
  1. 4
      lib/business_system/home/business_home_page.dart
  2. 44
      lib/business_system/home/home_view/home_sideslip_dialog.dart

4
lib/business_system/home/business_home_page.dart

@ -98,6 +98,8 @@ class _BusinessHomePage extends State<BusinessHomePage>
behavior: HitTestBehavior.opaque,
onTap: (){
showAlertDialog();
//
// SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle(statusBarColor: Colors.white), );
// Navigator.of(context).pushNamed('/router/select_shop');
},
child: Row(
@ -292,7 +294,7 @@ class _BusinessHomePage extends State<BusinessHomePage>
///
showAlertDialog() {
showDialog(
showCupertinoModalPopup(
builder: (context) {
return HomeSideslipDialog();},
context: context);

44
lib/business_system/home/home_view/home_sideslip_dialog.dart

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/utils/font_weight.dart';
@ -42,7 +43,11 @@ class _HomeSideslipDialog extends State<HomeSideslipDialog> with SingleTickerPro
return SlideTransition(position: _animation,
child: WillPopScope(
///
// onWillPop: () async => false,
onWillPop: () async {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
return true;
},
child: Container(
width: double.infinity,
margin: EdgeInsets.only(right:61.w),
@ -123,21 +128,28 @@ class _HomeSideslipDialog extends State<HomeSideslipDialog> with SingleTickerPro
);
},
)),
Container(
alignment: Alignment.center,
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 9.h),
margin: EdgeInsets.only(left:16.w,right: 16.w,bottom: 103.h,top: 20.h),
decoration: BoxDecoration(
color: Color(0xFF30415B),
borderRadius: BorderRadius.circular(4.w),
),
child:Text("退出登录",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white
),),),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
},
child: Container(
alignment: Alignment.center,
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 9.h),
margin: EdgeInsets.only(left:16.w,right: 16.w,bottom: 103.h,top: 20.h),
decoration: BoxDecoration(
color: Color(0xFF30415B),
borderRadius: BorderRadius.circular(4.w),
),
child:Text("退出登录",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white
),),),
),
],
),
),

Loading…
Cancel
Save