219 lines
6.6 KiB
Dart
219 lines
6.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../appRouters.dart';
|
|
import '../app_settings/app_colors.dart';
|
|
import '../baseWidget.dart';
|
|
import '../tools/submitBtn.dart';
|
|
import '../tools/titleAppBar.dart';
|
|
import '../translations/trans_lib.dart';
|
|
|
|
class StarLockMinePage extends StatefulWidget {
|
|
const StarLockMinePage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<StarLockMinePage> createState() => _StarLockMinePageState();
|
|
}
|
|
|
|
GlobalKey<_StarLockMinePageState> starLockMineKey = GlobalKey();
|
|
|
|
class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: const Color(0xFFFFFFFF),
|
|
// appBar: TitleAppBar(barTitle: "", haveBack:false, backgroundColor: AppColors.mainColor),
|
|
body: Column(
|
|
children: [
|
|
topWidget(),
|
|
bottomListWidget(),
|
|
SizedBox(
|
|
height: 40.h,
|
|
),
|
|
// keyBottomWidget()
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget topWidget() {
|
|
return Container(
|
|
height: 380.h,
|
|
width: 1.sw,
|
|
color: AppColors.mainColor,
|
|
// color: Colors.red,
|
|
child: Stack(
|
|
children: [
|
|
Image.asset(
|
|
'images/mine/icon_mine_topBg.png',
|
|
width: 400.w,
|
|
height: 380.h,
|
|
fit: BoxFit.fill,
|
|
),
|
|
Center(
|
|
child: Column(
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
SizedBox(
|
|
height: 120.h,
|
|
),
|
|
GestureDetector(
|
|
onTap: () {
|
|
// Navigator.pushNamed(context, Routers.starLockLoginPage);
|
|
Navigator.pushNamed(context, Routers.minePersonInfoPage);
|
|
},
|
|
child: SizedBox(
|
|
width: 108.w,
|
|
height: 105.w,
|
|
child: Image.asset(
|
|
'images/mine/icon_mine_main_defaultAvatar.png',
|
|
width: 60.w,
|
|
height: 60.w)),
|
|
),
|
|
SizedBox(
|
|
height: 20.h,
|
|
),
|
|
Text("15080825640",
|
|
style: TextStyle(
|
|
fontSize: 22.sp,
|
|
color: Colors.white,
|
|
)),
|
|
SizedBox(
|
|
height: 10.h,
|
|
),
|
|
Text(
|
|
"${TranslationLoader.lanKeys!.accountNumber!.tr}:15080825640",
|
|
style: TextStyle(
|
|
fontSize: 18.sp,
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.w500)),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget bottomListWidget() {
|
|
return Expanded(
|
|
child: ListView(
|
|
padding: EdgeInsets.only(
|
|
left: 60.w,
|
|
top: 50.h,
|
|
),
|
|
children: <Widget>[
|
|
// mineItem('images/mine/icon_mine_main_personInfo.png',
|
|
// TranslationLoader.lanKeys!.personalInformation!.tr, () {
|
|
// Navigator.pushNamed(context, Routers.minePersonInfoPage);
|
|
// }),
|
|
mineItem('images/mine/icon_mine_main_addLock.png',
|
|
TranslationLoader.lanKeys!.addDevice!.tr, () {
|
|
Navigator.pushNamed(context, Routers.seletLockTypePage);
|
|
}),
|
|
// mineItem('images/mine/icon_mine_main_gateway.png',
|
|
// TranslationLoader.lanKeys!.gateway!.tr, () {
|
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
|
// }),
|
|
mineItem('images/mine/icon_mine_main_message.png',
|
|
TranslationLoader.lanKeys!.message!.tr, () {
|
|
Navigator.pushNamed(context, Routers.messageListPage);
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_supportStaff.png',
|
|
TranslationLoader.lanKeys!.supportStaff!.tr, () {
|
|
Navigator.pushNamed(context, Routers.supportStaffPage);
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_set.png',
|
|
TranslationLoader.lanKeys!.set!.tr, () {
|
|
Navigator.pushNamed(context, Routers.mineSetPage);
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_vip.png',
|
|
TranslationLoader.lanKeys!.valueAddedServices!.tr, () {
|
|
Navigator.pushNamed(context, Routers.valueAddedServicesPage);
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_about.png',
|
|
TranslationLoader.lanKeys!.about!.tr, () {
|
|
Navigator.pushNamed(context, Routers.abountPage);
|
|
}),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget keyBottomWidget() {
|
|
return Column(
|
|
children: [
|
|
SubmitBtn(
|
|
btnName: TranslationLoader.lanKeys!.logout!.tr,
|
|
borderRadius: 20.w,
|
|
fontSize: 32.sp,
|
|
margin: EdgeInsets.only(left: 60.w, right: 60.w),
|
|
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
|
|
onClick: () {}),
|
|
Container(
|
|
padding: EdgeInsets.only(right: 30.w),
|
|
// color: Colors.red,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
TextButton(
|
|
child: Text(
|
|
TranslationLoader.lanKeys!.deleteAccount!.tr,
|
|
style: TextStyle(
|
|
color: AppColors.mainColor, fontWeight: FontWeight.w500),
|
|
),
|
|
onPressed: () {},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 30.h,
|
|
)
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget mineItem(
|
|
String lockTypeIcon, String lockTypeTitle, Function() action) {
|
|
return GestureDetector(
|
|
onTap: action,
|
|
child: Row(
|
|
children: [
|
|
Center(
|
|
child: Container(
|
|
// height: 80.h,
|
|
width: 330.w,
|
|
padding: EdgeInsets.all(20.h),
|
|
color: Colors.white,
|
|
child: Row(
|
|
children: [
|
|
Image.asset(
|
|
lockTypeIcon,
|
|
width: 28.w,
|
|
height: 28.w,
|
|
),
|
|
SizedBox(width: 15.w),
|
|
Text(
|
|
lockTypeTitle,
|
|
style: TextStyle(fontSize: 22.sp),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
height: 0.5.h,
|
|
color: Colors.grey,
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
void onShow() {}
|
|
|
|
void onHide() {}
|
|
}
|