Daisy 76ceab6f34 1,星锁主界面UI更新
2,锁列表UI更新
3,侧边栏 个人信息模块UI更新
4,添加锁模块UI更新
5,我的-设置模块UI更新
6,新增“添加授权管理员”页面UI布局
2023-07-27 15:26:30 +08:00

140 lines
4.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/tools/seletImgTool.dart';
import '../../../appRouters.dart';
import '../../../tools/commonItem.dart';
import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart';
class MinePersonInfoPage extends StatefulWidget {
const MinePersonInfoPage({Key? key}) : super(key: key);
@override
State<MinePersonInfoPage> createState() => _MinePersonInfoPageState();
}
class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.avatar!.tr,
rightTitle: "",
allHeight: 100.h,
isHaveLine: true,
isHaveDirection: true,
isHaveRightWidget: true,
rightWidget: Container(),
/*
Container(
width: 75.w,
height: 75.h,
child: Image.asset(
'images/mine/icon_mine_main_defaultAvatar.png')),
*/
action: () {
_openModalBottomSheet();
},
),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.nickName!.tr,
rightTitle: "你好",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.minePersonInfoEditNamePage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr,
rightTitle: "786612630@qq.com",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.minePersonInfoEditAccountPage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.email!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.minePersonInfoEditEmailPage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.resetPasswords!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.minePersonInfoResetPasswordPage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.safetyProblem!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Navigator.pushNamed(
context, Routers.minePersonInfoSetSafetyProblemPage);
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
rightTitle: "中国",
isHaveLine: false,
isHaveDirection: false),
],
));
}
Future _openModalBottomSheet() async {
final option = await showModalBottomSheet(
context: context,
builder: (BuildContext context) {
return Container(
height: 200.0,
child: Column(
children: <Widget>[
ListTile(
title: Text('拍照', textAlign: TextAlign.center),
onTap: () {
SeletImageTool().getCameraImage((imgStr) {
print("111111$imgStr");
});
},
),
ListTile(
title: Text('从相册选择', textAlign: TextAlign.center),
onTap: () {
SeletImageTool().getImage((imgStr) {
print("111111$imgStr");
});
},
),
ListTile(
title: Text('取消', textAlign: TextAlign.center),
onTap: () {
Navigator.pop(context, '取消');
},
),
],
),
);
});
}
}