You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
268 lines
7.8 KiB
268 lines
7.8 KiB
import 'package:flutter/cupertino.dart'; |
|
import 'package:flutter/material.dart'; |
|
import 'package:huixiang/view_widget/classic_header.dart'; |
|
import 'package:huixiang/view_widget/my_footer.dart'; |
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import '../../utils/font_weight.dart'; |
|
|
|
class BusinessMinePage extends StatefulWidget { |
|
@override |
|
State<StatefulWidget> createState() { |
|
return _BusinessMinePage(); |
|
} |
|
} |
|
|
|
class _BusinessMinePage extends State<BusinessMinePage> |
|
with AutomaticKeepAliveClientMixin { |
|
final RefreshController refreshController = RefreshController(); |
|
|
|
@override |
|
void initState() { |
|
super.initState(); |
|
} |
|
|
|
@override |
|
void dispose() { |
|
super.dispose(); |
|
} |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
super.build(context); |
|
return Column( |
|
children: [ |
|
Expanded( |
|
child: Container( |
|
child: SmartRefresher( |
|
controller: refreshController, |
|
enablePullDown: true, |
|
enablePullUp: false, |
|
header: MyHeader(), |
|
physics: BouncingScrollPhysics(), |
|
footer: CustomFooter( |
|
builder: (context, mode) { |
|
return MyFooter(mode); |
|
}, |
|
), |
|
onRefresh: () { |
|
setState(() {}); |
|
}, |
|
child: SingleChildScrollView( |
|
physics: NeverScrollableScrollPhysics(), |
|
child: Container( |
|
child: Column( |
|
children: [ |
|
mineInfo(), |
|
commonFunctions(), |
|
otherFunctions(), |
|
SizedBox( |
|
height:54.h, |
|
), |
|
Text( |
|
"@回乡信息公司", |
|
style: TextStyle( |
|
fontSize: 14.sp, |
|
color: Color(0xFF30415B), |
|
fontWeight: MyFontWeight.medium),), |
|
], |
|
), |
|
)), |
|
), |
|
), |
|
), |
|
SizedBox( |
|
height: 76.h, |
|
), |
|
], |
|
); |
|
} |
|
|
|
Widget mineInfo() { |
|
return Container( |
|
child: Stack( |
|
children: [ |
|
Container( |
|
width: double.infinity, |
|
height: 238.h, |
|
decoration: BoxDecoration( |
|
image: DecorationImage( |
|
image: AssetImage( |
|
"assets/image/bs_mine_bg.webp", |
|
), |
|
fit: BoxFit.cover, |
|
), |
|
), |
|
), |
|
GestureDetector( |
|
behavior: HitTestBehavior.opaque, |
|
onTap: (){ |
|
Navigator.of(context).pushNamed('/router/account_information'); |
|
}, |
|
child: Container( |
|
padding: EdgeInsets.only( |
|
top: MediaQuery.of(context).padding.top + 50, left: 16.w), |
|
child: Row( |
|
children: [ |
|
Image.asset( |
|
"assets/image/bs_mine_heading.webp", |
|
width: 69, |
|
height: 69, |
|
fit: BoxFit.fill, |
|
), |
|
SizedBox( |
|
width: 10.w, |
|
), |
|
Column( |
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
children: [ |
|
Text( |
|
'海峡姐妹茶', |
|
style: TextStyle( |
|
fontSize: 18.sp, |
|
color: Color(0xFF374C6C), |
|
fontWeight: MyFontWeight.semi_bold), |
|
), |
|
Text( |
|
'ID:gsy2022', |
|
style: TextStyle( |
|
fontSize: 16.sp, |
|
color: Color(0xFF374C6C), |
|
fontWeight: MyFontWeight.regular), |
|
), |
|
], |
|
) |
|
], |
|
), |
|
), |
|
), |
|
], |
|
), |
|
); |
|
} |
|
|
|
///常用功能 |
|
Widget commonFunctions() { |
|
return Container( |
|
margin: EdgeInsets.only(top:26.h, left: 16.w, right:17.w,bottom:23.h), |
|
child: Column( |
|
children: [ |
|
Row( |
|
children: [ |
|
Container( |
|
width: 4.w, |
|
height: 16.h, |
|
color: Color(0xFF30415B), |
|
margin: EdgeInsets.only(right: 12.w), |
|
), |
|
Text( |
|
'常用功能', |
|
style: TextStyle( |
|
fontSize: 16.sp, |
|
color: Color(0xFF262626), |
|
fontWeight: MyFontWeight.semi_bold), |
|
), |
|
], |
|
), |
|
SizedBox(height:20.h,), |
|
GestureDetector( |
|
behavior: HitTestBehavior.opaque, |
|
onTap: (){ |
|
Navigator.of(context).pushNamed('/router/merchant_info'); |
|
}, |
|
child: |
|
commonFunctionsItem("assets/image/bs_store_info_logo.webp", "商户信息", "一心回乡农场"), |
|
), |
|
Container( |
|
width: double.infinity, |
|
height: 1.h, |
|
color: Color(0xFFEBECEF), |
|
margin: EdgeInsets.only(left:32.w,bottom:12.h), |
|
), |
|
// commonFunctionsItem("assets/image/bs_shop_logo.webp", "门店设置", ""), |
|
// Container( |
|
// width: double.infinity, |
|
// height: 1.h, |
|
// color: Color(0xFFEBECEF), |
|
// margin: EdgeInsets.only(left:32.w,bottom:12.h), |
|
// ), |
|
GestureDetector( |
|
behavior: HitTestBehavior.opaque, |
|
onTap: (){ |
|
Navigator.of(context).pushNamed('/router/security_setting'); |
|
}, |
|
child: commonFunctionsItem("assets/image/bs_secure.webp", "安全设置", "登录手机号/密码") |
|
), |
|
], |
|
), |
|
); |
|
} |
|
|
|
Widget commonFunctionsItem(icon,leftText,rightText){ |
|
return Container( |
|
margin: EdgeInsets.only(bottom:14.h), |
|
child: Row( |
|
children: [ |
|
Image.asset( |
|
icon, |
|
width: 24, |
|
height:24, |
|
fit: BoxFit.fill,), |
|
SizedBox(width:8.w,), |
|
Expanded(child: Text( |
|
leftText, |
|
style: TextStyle( |
|
fontSize: 14.sp, |
|
color: Color(0xFF30415B), |
|
fontWeight: MyFontWeight.medium),)), |
|
Text( |
|
rightText, |
|
style: TextStyle( |
|
fontSize: 14.sp, |
|
color: Color(0xFF353535), |
|
fontWeight: MyFontWeight.medium),), |
|
Image.asset( |
|
"assets/image/icon_right_z.webp", |
|
width: 16, |
|
height:16, |
|
color: Color(0xFF353535), |
|
), |
|
], |
|
), |
|
); |
|
} |
|
|
|
Widget otherFunctions(){ |
|
return Container( |
|
margin: EdgeInsets.only(left: 16.w, right:17.w,), |
|
child: Column( |
|
children: [ |
|
Row( |
|
children: [ |
|
Container( |
|
width: 4.w, |
|
height: 16.h, |
|
color: Color(0xFF30415B), |
|
margin: EdgeInsets.only(right: 12.w), |
|
), |
|
Text( |
|
'其他功能', |
|
style: TextStyle( |
|
fontSize: 16.sp, |
|
color: Color(0xFF262626), |
|
fontWeight: MyFontWeight.semi_bold), |
|
), |
|
], |
|
), |
|
SizedBox(height:20.h,), |
|
commonFunctionsItem("assets/image/bs_user.webp", "关于我们", ""), |
|
], |
|
), |
|
); |
|
} |
|
|
|
@override |
|
bool get wantKeepAlive => true; |
|
}
|
|
|