140 lines
4.8 KiB
Dart
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, '取消');
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
});
|
|
}
|
|
}
|