131 lines
4.0 KiB
Dart
131 lines
4.0 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/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()
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget topWidget(){
|
|
return Container(
|
|
height: 450.h,
|
|
width: 1.sw,
|
|
color: AppColors.mainColor,
|
|
// color: Colors.red,
|
|
child: Column(
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
SizedBox(height: 120.h,),
|
|
GestureDetector(
|
|
onTap: (){
|
|
Navigator.pushNamed(context, Routers.starLockLoginPage);
|
|
},
|
|
child: Container(
|
|
width: 150.w, height: 150.w,
|
|
decoration: BoxDecoration(
|
|
border: Border.all(width: 2, color: Colors.white),
|
|
borderRadius: BorderRadius.circular(60.h),
|
|
),
|
|
padding: EdgeInsets.all(20.w),
|
|
child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 100.w, height: 100.w)
|
|
),
|
|
),
|
|
SizedBox(height: 20.h,),
|
|
Text("15080825640", style: TextStyle(fontSize: 30.sp, color: Colors.white, fontWeight: FontWeight.w500)),
|
|
SizedBox(height: 10.h,),
|
|
Text("账号:15080825640", style: TextStyle(fontSize: 22.sp, color: Colors.white, fontWeight: FontWeight.w500)),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget bottomListWidget(){
|
|
return Expanded(
|
|
child: ListView(
|
|
padding: EdgeInsets.only(left: 110.w, top: 80.h, right: 10.w),
|
|
children: <Widget>[
|
|
mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys.addLock.tr, (){
|
|
Navigator.pushNamed(context, Routers.seletLockTypePage);
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys.gateway.tr, (){
|
|
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys.message.tr, (){
|
|
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys.supportStaff.tr, (){
|
|
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys.set.tr, (){
|
|
Navigator.pushNamed(context, Routers.mineSetPage);
|
|
}),
|
|
mineItem('images/mine/icon_mine_main_moreServices.png', TranslationLoader.lanKeys.moreServices.tr, (){
|
|
|
|
}),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget mineItem(String lockTypeIcon, String lockTypeTitle, Function action){
|
|
return GestureDetector(
|
|
onTap: action,
|
|
child: Row(
|
|
children: [
|
|
Center(
|
|
child: Container(
|
|
height: 80.h,
|
|
width: 300.w,
|
|
color: Colors.white,
|
|
child: Row(
|
|
children: [
|
|
SizedBox(width:20.w),
|
|
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
|
SizedBox(width:10.w),
|
|
Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Container(height: 0.5.h, color: Colors.grey,)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
void onShow(){
|
|
|
|
}
|
|
|
|
void onHide(){
|
|
|
|
}
|
|
}
|
|
|