fix:修复 人脸修改姓名后回退到问题
This commit is contained in:
parent
3de600acda
commit
e56685be9c
@ -924,5 +924,6 @@
|
||||
"导出成功":"Export success",
|
||||
"发送钥匙": "Send key",
|
||||
"进度": "Progress",
|
||||
"失败": "Failure"
|
||||
"失败": "Failure",
|
||||
"人脸详情": "Face details"
|
||||
}
|
||||
|
||||
@ -956,5 +956,6 @@
|
||||
"导出成功":"导出成功",
|
||||
"发送钥匙": "发送钥匙",
|
||||
"进度": "进度",
|
||||
"失败": "失败"
|
||||
"失败": "失败",
|
||||
"人脸详情": "人脸详情"
|
||||
}
|
||||
|
||||
@ -921,6 +921,7 @@
|
||||
"导出成功":"导出成功",
|
||||
"发送钥匙": "发送钥匙",
|
||||
"进度": "进度",
|
||||
"失败": "失败"
|
||||
"失败": "失败",
|
||||
"人脸详情": "人脸详情"
|
||||
|
||||
}
|
||||
|
||||
@ -174,6 +174,8 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
showToast('修改成功', something: () {
|
||||
Get.back(result: 'addScuess');
|
||||
});
|
||||
}else{
|
||||
Get.back();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: '人脸详情',
|
||||
barTitle: '人脸详情'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
@ -44,7 +44,9 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr, state.typeName.value, () {
|
||||
Obx(() => lockDataListItem(
|
||||
TranslationLoader.lanKeys!.name!.tr, state.typeName.value,
|
||||
() {
|
||||
// showCupertinoAlertDialog(context);
|
||||
ShowTipView().showTFViewAlertDialog(
|
||||
state.changeNameController,
|
||||
@ -54,7 +56,6 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
logic.showToast('请输入姓名'.tr);
|
||||
return;
|
||||
}
|
||||
Get.back();
|
||||
state.typeName.value = state.changeNameController.text;
|
||||
logic.updateFaceNameData();
|
||||
}, inputFormatters: <TextInputFormatter>[
|
||||
@ -64,8 +65,8 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
})),
|
||||
Obx(() => Visibility(
|
||||
visible: state.keyType.value == 4 ||
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1,
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
allHeight: 70.h,
|
||||
@ -187,11 +188,12 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
rightTitle: '',
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.lockOperatingRecordPage, arguments: <String, Object?>{
|
||||
'type': 4,
|
||||
'id': state.faceItemData.value.faceId.toString(),
|
||||
'recordName': state.faceItemData.value.faceName
|
||||
});
|
||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||
arguments: <String, Object?>{
|
||||
'type': 4,
|
||||
'id': state.faceItemData.value.faceId.toString(),
|
||||
'recordName': state.faceItemData.value.faceName
|
||||
});
|
||||
}),
|
||||
// SizedBox(height: 40.h),
|
||||
// addControlsBtn(type),
|
||||
@ -215,12 +217,14 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
);
|
||||
}
|
||||
|
||||
Widget lockDataListItem(String leftTitle, String conentStr, Function()? action){
|
||||
Widget lockDataListItem(
|
||||
String leftTitle, String conentStr, Function()? action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
// height: 70.h,
|
||||
padding: EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h),
|
||||
padding:
|
||||
EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
@ -228,15 +232,17 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
color: AppColors.greyLineColor, // 设置边框颜色
|
||||
width: 2.0.h, // 设置边框宽度
|
||||
),
|
||||
)
|
||||
),
|
||||
)),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text(leftTitle, style: TextStyle(fontSize: 22.sp)),
|
||||
SizedBox(width: 10.w),
|
||||
Expanded(
|
||||
child: Text(conentStr, textAlign:TextAlign.end, style: TextStyle(fontSize: 22.sp, ))
|
||||
),
|
||||
child: Text(conentStr,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
))),
|
||||
SizedBox(width: 10.w),
|
||||
Image.asset(
|
||||
'images/icon_right_grey.png',
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
@ -8,34 +7,47 @@ class ShowDeleteAdministratorIsHaveAllDataWidget extends StatefulWidget {
|
||||
BlockIsHaveAllDataCallback? blockIsHaveAllDataCallback;
|
||||
String? contentStr;
|
||||
|
||||
ShowDeleteAdministratorIsHaveAllDataWidget({Key? key, this.contentStr, this.blockIsHaveAllDataCallback}) : super(key: key);
|
||||
ShowDeleteAdministratorIsHaveAllDataWidget(
|
||||
{Key? key, this.contentStr, this.blockIsHaveAllDataCallback})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<ShowDeleteAdministratorIsHaveAllDataWidget> createState() => _ShowDeleteAdministratorIsHaveAllDataWidgetState();
|
||||
State<ShowDeleteAdministratorIsHaveAllDataWidget> createState() =>
|
||||
_ShowDeleteAdministratorIsHaveAllDataWidgetState();
|
||||
}
|
||||
|
||||
class _ShowDeleteAdministratorIsHaveAllDataWidgetState extends State<ShowDeleteAdministratorIsHaveAllDataWidget> {
|
||||
class _ShowDeleteAdministratorIsHaveAllDataWidgetState
|
||||
extends State<ShowDeleteAdministratorIsHaveAllDataWidget> {
|
||||
bool selet = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
selet = !selet;
|
||||
widget.blockIsHaveAllDataCallback!(selet);
|
||||
});
|
||||
},
|
||||
child: Image.asset(
|
||||
selet ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png',
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
)),
|
||||
SizedBox(width: 15.w,),
|
||||
Expanded(child: Text(widget.contentStr!, maxLines: 2, textAlign: TextAlign.start, style: TextStyle(fontSize: 24.sp))),
|
||||
],
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
selet = !selet;
|
||||
widget.blockIsHaveAllDataCallback!(selet);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Image.asset(
|
||||
selet
|
||||
? 'images/icon_round_select.png'
|
||||
: 'images/icon_round_unSelect.png',
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 15.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(widget.contentStr!,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontSize: 24.sp))),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user