统一国际化到添加手掌

This commit is contained in:
魏少阳 2024-07-26 09:57:44 +08:00
parent 0de849f4cf
commit 9235b66e9e
27 changed files with 100 additions and 103 deletions

View File

@ -57,9 +57,11 @@
"删除公司": "Delete Company", "删除公司": "Delete Company",
"密码详情": "Password Detail", "密码详情": "Password Detail",
"修改密码": "Modify Password", "修改密码": "Modify Password",
"添加虹膜": "Add Iris",
"添加门磁": "Add Door Magnetic",
"添加无线键盘": "Add Wireless Keyboard",
"添加手掌": "Add Palm",
"cancel": "Cancel",
"add": "Add",
"accountNumber": "AccountNumber", "accountNumber": "AccountNumber",
"volumeAuthorizationLock": "Volume Authorization Lock", "volumeAuthorizationLock": "Volume Authorization Lock",
"authorizedAdminTip": "The authorized administrator has important access to this lock, so make sure you only send it to people you trust", "authorizedAdminTip": "The authorized administrator has important access to this lock, so make sure you only send it to people you trust",

View File

@ -57,9 +57,11 @@
"删除公司": "删除公司", "删除公司": "删除公司",
"密码详情": "密码详情", "密码详情": "密码详情",
"修改密码": "修改密码", "修改密码": "修改密码",
"添加虹膜": "添加虹膜",
"添加门磁": "添加门磁",
"添加无线键盘": "添加无线键盘",
"添加手掌": "添加手掌",
"cancel":"cancel",
"add":"add",
"accountNumber":"accountNumber", "accountNumber":"accountNumber",
"volumeAuthorizationLock":"volumeAuthorizationLock", "volumeAuthorizationLock":"volumeAuthorizationLock",
"authorizedAdminTip":"authorizedAdminTip", "authorizedAdminTip":"authorizedAdminTip",

View File

@ -57,9 +57,11 @@
"删除公司": "删除公司", "删除公司": "删除公司",
"密码详情": "密码详情", "密码详情": "密码详情",
"修改密码": "修改密码", "修改密码": "修改密码",
"添加虹膜": "添加虹膜",
"添加门磁": "添加门磁",
"添加无线键盘": "添加无线键盘",
"添加手掌": "添加手掌",
"cancel": "取消",
"add": "添加",
"accountNumber": "账号", "accountNumber": "账号",
"volumeAuthorizationLock": "批量授权锁", "volumeAuthorizationLock": "批量授权锁",
"authorizedAdminTip": "授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人", "authorizedAdminTip": "授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人",

View File

@ -23,8 +23,7 @@ class _VolumeAuthorizationLockManagePageState
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: barTitle: '添加授权管理员'.tr,
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.authorizedAdmin!.tr}",
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor),
body: Column( body: Column(

View File

@ -228,7 +228,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.only(left: 22, right: 12), padding: const EdgeInsets.only(left: 22, right: 12),
child: Text(TranslationLoader.lanKeys!.cancel!.tr, child: Text('取消'.tr,
style: const TextStyle(color: Colors.black, fontSize: 16.0)), style: const TextStyle(color: Colors.black, fontSize: 16.0)),
), ),
), ),

View File

@ -535,7 +535,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
// //
normalIndex: 0, normalIndex: 0,
title: TranslationLoader.lanKeys!.rankingList!.tr, title: TranslationLoader.lanKeys!.rankingList!.tr,
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, cancelTitle: '取消'.tr,
sureTitle: '确定'.tr, sureTitle: '确定'.tr,
// //
// //

View File

@ -34,7 +34,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: barTitle:
"${state.isAdd.value == "1" ? TranslationLoader.lanKeys!.add!.tr : "编辑".tr}${TranslationLoader.lanKeys!.staff!.tr}", "${state.isAdd.value == "1" ? '添加'.tr : "编辑".tr}${TranslationLoader.lanKeys!.staff!.tr}",
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor),
body: Column( body: Column(
@ -365,7 +365,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
// //
normalIndex: 0, normalIndex: 0,
title: title, title: title,
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, cancelTitle: '取消'.tr,
sureTitle: '确定'.tr, sureTitle: '确定'.tr,
// //
// //

View File

@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart'; import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
import 'package:star_lock/main/lockDetail/iris/irisList/irisList_logic.dart'; import 'package:star_lock/main/lockDetail/iris/irisList/irisList_logic.dart';
import 'package:star_lock/main/lockDetail/iris/irisList/irisList_state.dart';
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart'; import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
import 'package:star_lock/tools/keySearchWidget.dart'; import 'package:star_lock/tools/keySearchWidget.dart';
import 'package:star_lock/tools/left_slide/left_slide_actions.dart'; import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
@ -25,8 +26,8 @@ class IrisListPage extends StatefulWidget {
} }
class _IrisListPageState extends State<IrisListPage> { class _IrisListPageState extends State<IrisListPage> {
final logic = Get.put(IrisListLogic()); final IrisListLogic logic = Get.put(IrisListLogic());
final state = Get.find<IrisListLogic>().state; final IrisListState state = Get.find<IrisListLogic>().state;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -36,14 +37,14 @@ class _IrisListPageState extends State<IrisListPage> {
barTitle: '虹膜'.tr, barTitle: '虹膜'.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, backgroundColor: AppColors.mainColor,
actionsList: [ actionsList: <Widget>[
TextButton( TextButton(
child: Text( child: Text(
'重置'.tr, '重置'.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp), style: TextStyle(color: Colors.white, fontSize: 24.sp),
), ),
onPressed: () async { onPressed: () async {
final isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
if (isDemoMode == false) { if (isDemoMode == false) {
final bool isNetWork = final bool isNetWork =
await LockMainLogic.to()?.judgeTheNetwork() ?? false; await LockMainLogic.to()?.judgeTheNetwork() ?? false;
@ -53,14 +54,14 @@ class _IrisListPageState extends State<IrisListPage> {
showDeletAlertDialog(context); showDeletAlertDialog(context);
} else { } else {
// Get.toNamed(Routers.selectLockTypePage); // Get.toNamed(Routers.selectLockTypePage);
logic.showToast("演示模式"); logic.showToast('演示模式');
} }
}, },
), ),
], ],
), ),
body: Column( body: Column(
children: [ children: <Widget>[
KeySearchWidget( KeySearchWidget(
editingController: state.searchController, editingController: state.searchController,
onSubmittedAction: () { onSubmittedAction: () {
@ -72,7 +73,7 @@ class _IrisListPageState extends State<IrisListPage> {
), ),
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
AddBottomWhiteBtn( AddBottomWhiteBtn(
btnName: '${TranslationLoader.lanKeys!.add!.tr}${'虹膜'.tr}', btnName: '添加虹膜'.tr,
onClick: () async { onClick: () async {
// var data = // var data =
// await Get.toNamed(Routers.addFaceTypeManagePage, arguments: { // await Get.toNamed(Routers.addFaceTypeManagePage, arguments: {
@ -80,9 +81,9 @@ class _IrisListPageState extends State<IrisListPage> {
// "fromType": 1 // 1 2 // "fromType": 1 // 1 2
// }); // });
final data = final data =
await Get.toNamed(Routers.addIrisTypeManagePage, arguments: { await Get.toNamed(Routers.addIrisTypeManagePage, arguments: <String, int>{
"lockId": state.lockId.value, 'lockId': state.lockId.value,
"fromType": 1 // 1 2 'fromType': 1 // 1 2
}); });
if (data != null) { if (data != null) {
// logic.getFaceListData(); // logic.getFaceListData();
@ -100,7 +101,7 @@ class _IrisListPageState extends State<IrisListPage> {
return Obx(() => state.faceItemListData.value.isNotEmpty return Obx(() => state.faceItemListData.value.isNotEmpty
? ListView.separated( ? ListView.separated(
itemCount: state.faceItemListData.value.length, itemCount: state.faceItemListData.value.length,
itemBuilder: (c, index) { itemBuilder: (BuildContext c, int index) {
final FingerprintItemData getFaceItemData = final FingerprintItemData getFaceItemData =
state.faceItemListData.value[index]; state.faceItemListData.value[index];
// //
@ -109,7 +110,7 @@ class _IrisListPageState extends State<IrisListPage> {
tag: getFaceItemData.faceName!, tag: getFaceItemData.faceName!,
key: Key(getFaceItemData.faceName!), key: Key(getFaceItemData.faceName!),
actionsWidth: 60, actionsWidth: 60,
actions: [ actions: <Widget>[
_buildDeleteBtn(getFaceItemData), _buildDeleteBtn(getFaceItemData),
], ],
decoration: const BoxDecoration( decoration: const BoxDecoration(
@ -121,17 +122,17 @@ class _IrisListPageState extends State<IrisListPage> {
(getFaceItemData.faceType! != 1) (getFaceItemData.faceType! != 1)
? (getFaceItemData.endDate! < ? (getFaceItemData.endDate! <
DateTime.now().millisecondsSinceEpoch DateTime.now().millisecondsSinceEpoch
? "已失效" ? '已失效'
: "") : '')
: "", : '',
getFaceItemData.validTimeStr!, getFaceItemData.validTimeStr!,
// fingerprintItemData.fingerprintType! == 1 // fingerprintItemData.fingerprintType! == 1
// ? "永久" // ? "永久"
// : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", // : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}",
() async { () async {
final data = final data =
await Get.toNamed(Routers.faceDetailPage, arguments: { await Get.toNamed(Routers.faceDetailPage, arguments: <String, FingerprintItemData>{
"faceItemData": getFaceItemData, 'faceItemData': getFaceItemData,
}); });
if (data != null) { if (data != null) {
// logic.getFaceListData(); // logic.getFaceListData();
@ -182,8 +183,8 @@ class _IrisListPageState extends State<IrisListPage> {
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return ShowIosTipView( return ShowIosTipView(
title: "提示", title: '提示',
tipTitle: "确定要删除吗?", tipTitle: '确定要删除吗?',
sureClick: () async { sureClick: () async {
Get.back(); Get.back();
state.isDeletFaceData = true; state.isDeletFaceData = true;
@ -212,17 +213,17 @@ class _IrisListPageState extends State<IrisListPage> {
// // borderRadius: BorderRadius.circular(10.w), // // borderRadius: BorderRadius.circular(10.w),
// ), // ),
child: Row( child: Row(
children: [ children: <Widget>[
SizedBox(width: 30.w), SizedBox(width: 30.w),
Image.asset(lockTypeIcon, width: 60.w, height: 60.w), Image.asset(lockTypeIcon, width: 60.w, height: 60.w),
SizedBox(width: 20.w), SizedBox(width: 20.w),
Expanded( Expanded(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: <Widget>[
Row( Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: <Widget>[
Text(lockTypeTitle, Text(lockTypeTitle,
style: TextStyle( style: TextStyle(
fontSize: 24.sp, color: AppColors.blackColor)), fontSize: 24.sp, color: AppColors.blackColor)),
@ -235,7 +236,7 @@ class _IrisListPageState extends State<IrisListPage> {
SizedBox(height: 5.h), SizedBox(height: 5.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: <Widget>[
Text(showTime, Text(showTime,
style: TextStyle( style: TextStyle(
fontSize: 18.sp, fontSize: 18.sp,
@ -256,13 +257,13 @@ class _IrisListPageState extends State<IrisListPage> {
void showDeletAlertDialog(BuildContext context) { void showDeletAlertDialog(BuildContext context) {
showCupertinoDialog( showCupertinoDialog(
context: context, context: context,
builder: (context) { builder: (BuildContext context) {
return CupertinoAlertDialog( return CupertinoAlertDialog(
title: const Text("提示"), title: const Text('提示'),
content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'), content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
actions: [ actions: <Widget>[
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr), child: Text('取消'.tr),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, },
@ -273,8 +274,8 @@ class _IrisListPageState extends State<IrisListPage> {
Navigator.pop(context); Navigator.pop(context);
state.isDeletFaceData = true; state.isDeletFaceData = true;
state.isDeletAll = true; state.isDeletAll = true;
state.deletKeyID = "1"; state.deletKeyID = '1';
state.deletUserID = "DeleteAll!@#"; state.deletUserID = 'DeleteAll!@#';
state.deletFaceNo = 255; state.deletFaceNo = 255;
// logic.senderAddFace(); // logic.senderAddFace();
}, },

View File

@ -104,8 +104,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
// //
normalIndex: 0, normalIndex: 0,
title: TranslationLoader.lanKeys!.time!.tr, title: TranslationLoader.lanKeys!.time!.tr,
cancelTitle: cancelTitle:'取消'.tr,
TranslationLoader.lanKeys!.cancel!.tr,
sureTitle: '确定'.tr, sureTitle: '确定'.tr,
// //
data: list, data: list,

View File

@ -21,8 +21,7 @@ class _AddDoorMagneticPageState extends State<AddDoorMagneticPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: barTitle: '添加门磁'.tr,
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.doorMagnetic!.tr}",
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor),
body: ListView( body: ListView(

View File

@ -46,8 +46,7 @@ class _DoorMagneticPageState extends State<DoorMagneticPage> with BaseWidget {
Container( Container(
margin: EdgeInsets.only(left: 200.w, right: 200.w), margin: EdgeInsets.only(left: 200.w, right: 200.w),
child: SubmitBtn( child: SubmitBtn(
btnName: btnName:'添加门磁'.tr,
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.doorMagnetic!.tr}",
onClick: () { onClick: () {
Navigator.pushNamed(context, Routers.addDoorMagneticPage); Navigator.pushNamed(context, Routers.addDoorMagneticPage);
}), }),

View File

@ -22,8 +22,7 @@ class _AddWirelessKeyboardPageState extends State<AddWirelessKeyboardPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: barTitle:'添加无线键盘'.tr,
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor),
body: ListView( body: ListView(

View File

@ -23,8 +23,7 @@ class _AddWirelessKeyboardScreenNotLightOnPageState
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: barTitle:'添加无线键盘'.tr,
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor),
body: ListView( body: ListView(

View File

@ -41,7 +41,7 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
if (!isNetWork) { if (!isNetWork) {
return; return;
} }
_showDialog(context); _showDialog();
}, },
), ),
], ],
@ -50,8 +50,7 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
children: [ children: [
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
SubmitBtn( SubmitBtn(
btnName: btnName:'添加无线键盘'.tr,
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
onClick: () { onClick: () {
Navigator.pushNamed(context, Routers.addWirelessKeyboardPage); Navigator.pushNamed(context, Routers.addWirelessKeyboardPage);
}), }),
@ -143,15 +142,15 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
} }
// //
void _showDialog(widgetContext) { void _showDialog() {
showCupertinoDialog( showCupertinoDialog(
context: widgetContext, context: Get.context!,
builder: (context) { builder: (context) {
return CupertinoAlertDialog( return CupertinoAlertDialog(
title: const Text('该锁的无线键盘都将被删除'), title: const Text('该锁的无线键盘都将被删除'),
actions: [ actions: [
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr), child: Text('取消'.tr),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },

View File

@ -53,7 +53,7 @@ class _PalmListPageState extends State<PalmListPage> {
showDeletAlertDialog(context); showDeletAlertDialog(context);
} else { } else {
// Get.toNamed(Routers.selectLockTypePage); // Get.toNamed(Routers.selectLockTypePage);
logic.showToast("演示模式"); logic.showToast('演示模式');
} }
}, },
), ),
@ -72,7 +72,7 @@ class _PalmListPageState extends State<PalmListPage> {
), ),
Expanded(child: _buildMainUI()), Expanded(child: _buildMainUI()),
AddBottomWhiteBtn( AddBottomWhiteBtn(
btnName: '${TranslationLoader.lanKeys!.add!.tr}手掌', btnName: '添加手掌'.tr,
onClick: () async { onClick: () async {
// var data = // var data =
// await Get.toNamed(Routers.addFaceTypeManagePage, arguments: { // await Get.toNamed(Routers.addFaceTypeManagePage, arguments: {
@ -81,8 +81,8 @@ class _PalmListPageState extends State<PalmListPage> {
// }); // });
var data = var data =
await Get.toNamed(Routers.addPalmTypeManagePage, arguments: { await Get.toNamed(Routers.addPalmTypeManagePage, arguments: {
"lockId": state.lockId.value, 'lockId': state.lockId.value,
"fromType": 1 // 1 2 'fromType': 1 // 1 2
}); });
if (data != null) { if (data != null) {
// logic.getFaceListData(); // logic.getFaceListData();
@ -121,9 +121,9 @@ class _PalmListPageState extends State<PalmListPage> {
(getFaceItemData.faceType! != 1) (getFaceItemData.faceType! != 1)
? (getFaceItemData.endDate! < ? (getFaceItemData.endDate! <
DateTime.now().millisecondsSinceEpoch DateTime.now().millisecondsSinceEpoch
? "已失效" ? '已失效'
: "") : '')
: "", : '',
getFaceItemData.validTimeStr!, getFaceItemData.validTimeStr!,
// fingerprintItemData.fingerprintType! == 1 // fingerprintItemData.fingerprintType! == 1
// ? "永久" // ? "永久"
@ -131,7 +131,7 @@ class _PalmListPageState extends State<PalmListPage> {
() async { () async {
var data = var data =
await Get.toNamed(Routers.faceDetailPage, arguments: { await Get.toNamed(Routers.faceDetailPage, arguments: {
"faceItemData": getFaceItemData, 'faceItemData': getFaceItemData,
}); });
if (data != null) { if (data != null) {
// logic.getFaceListData(); // logic.getFaceListData();
@ -182,8 +182,8 @@ class _PalmListPageState extends State<PalmListPage> {
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return ShowIosTipView( return ShowIosTipView(
title: "提示", title: '提示',
tipTitle: "确定要删除吗?", tipTitle: '确定要删除吗?',
sureClick: () async { sureClick: () async {
Get.back(); Get.back();
state.isDeletFaceData = true; state.isDeletFaceData = true;
@ -258,11 +258,11 @@ class _PalmListPageState extends State<PalmListPage> {
context: context, context: context,
builder: (context) { builder: (context) {
return CupertinoAlertDialog( return CupertinoAlertDialog(
title: const Text("提示"), title: const Text('提示'),
content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'), content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
actions: [ actions: [
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr), child: Text('取消'.tr),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, },
@ -273,8 +273,8 @@ class _PalmListPageState extends State<PalmListPage> {
Navigator.pop(context); Navigator.pop(context);
state.isDeletFaceData = true; state.isDeletFaceData = true;
state.isDeletAll = true; state.isDeletAll = true;
state.deletKeyID = "1"; state.deletKeyID = '1';
state.deletUserID = "DeleteAll!@#"; state.deletUserID = 'DeleteAll!@#';
state.deletFaceNo = 255; state.deletFaceNo = 255;
// logic.senderAddFace(); // logic.senderAddFace();
}, },

View File

@ -96,7 +96,7 @@ class AddAuthorizedAdministratorLogic extends BaseGetXController {
title: const Text('接收者号码未注册,请重新发送'), title: const Text('接收者号码未注册,请重新发送'),
actions: <Widget>[ actions: <Widget>[
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr), child: Text('取消'.tr),
onPressed: Get.back, onPressed: Get.back,
), ),
CupertinoDialogAction( CupertinoDialogAction(

View File

@ -36,7 +36,7 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: state.type == 0 barTitle: state.type == 0
? TranslationLoader.lanKeys!.add!.tr ? '添加'.tr
: '删除'.tr, : '删除'.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor),

View File

@ -25,9 +25,9 @@ class _LockItemListPageState extends State<LockItemListPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Map map = Get.arguments; Map map = Get.arguments;
GroupListItem groupListItem = map["groupListItem"]; GroupListItem groupListItem = map['groupListItem'];
lockList = groupListItem.lockList!; lockList = groupListItem.lockList!;
ungrouped = map["ungrouped"]; ungrouped = map['ungrouped'];
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
@ -84,7 +84,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
left: (ScreenUtil().screenWidth - 200.w) / 2, left: (ScreenUtil().screenWidth - 200.w) / 2,
width: 200.w, width: 200.w,
child: SubmitBtn( child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.add!.tr, btnName: '添加'.tr,
onClick: () { onClick: () {
// //
Get.toNamed(Routers.groupEditLockPage, arguments: {'groupListItem': groupListItem, 'ungrouped': ungrouped, 'type': 0}); Get.toNamed(Routers.groupEditLockPage, arguments: {'groupListItem': groupListItem, 'ungrouped': ungrouped, 'type': 0});
@ -139,7 +139,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertBottomWidget( return AlertBottomWidget(
topTitle: '', topTitle: '',
items: [TranslationLoader.lanKeys!.add!.tr, '删除'.tr], items: ['添加'.tr, '删除'.tr],
chooseCallback: (value) { chooseCallback: (value) {
int getSelectIndex = value; int getSelectIndex = value;
if (getSelectIndex == 0) { if (getSelectIndex == 0) {

View File

@ -105,7 +105,7 @@ class RecipientInformationLogic extends BaseGetXController{
content: const Text('确定要移除所选中的坏锁吗?'), content: const Text('确定要移除所选中的坏锁吗?'),
actions: <Widget>[ actions: <Widget>[
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr), child: Text('取消'.tr),
onPressed: Get.back, onPressed: Get.back,
), ),
CupertinoDialogAction( CupertinoDialogAction(

View File

@ -65,7 +65,7 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> with Rout
} }
}); });
}, },
child: Text(state.isSelectAll == true ? TranslationLoader.lanKeys!.cancel!.tr : TranslationLoader.lanKeys!.checkAll!.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp))) child: Text(state.isSelectAll == true ? '取消'.tr : TranslationLoader.lanKeys!.checkAll!.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp)))
], ],
), ),
body: EasyRefreshTool( body: EasyRefreshTool(

View File

@ -283,7 +283,7 @@ class _NewSMSTemplatePageState extends State<NewSMSTemplatePage> {
context, context,
normalIndex: 0, normalIndex: 0,
title: TranslationLoader.lanKeys!.type!.tr, title: TranslationLoader.lanKeys!.type!.tr,
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, cancelTitle: '取消'.tr,
sureTitle: '确定'.tr, sureTitle: '确定'.tr,
data: titleList, data: titleList,
clickCallBack: (int index, Object str) { clickCallBack: (int index, Object str) {
@ -306,7 +306,7 @@ class _NewSMSTemplatePageState extends State<NewSMSTemplatePage> {
context, context,
normalIndex: 0, normalIndex: 0,
title: TranslationLoader.lanKeys!.type!.tr, title: TranslationLoader.lanKeys!.type!.tr,
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, cancelTitle: '取消'.tr,
sureTitle: '确定'.tr, sureTitle: '确定'.tr,
data: langNames, data: langNames,
clickCallBack: (int index, Object str) { clickCallBack: (int index, Object str) {

View File

@ -6,17 +6,14 @@ import 'package:star_lock/app_settings/app_colors.dart';
import '../translations/trans_lib.dart'; import '../translations/trans_lib.dart';
class AlertBottomWidget extends StatelessWidget { class AlertBottomWidget extends StatelessWidget {
AlertBottomWidget(
{required this.items, required this.chooseCallback, required this.topTitle, Key? key})
: super(key: key);
List items; List items;
ValueChanged<int> chooseCallback; ValueChanged<int> chooseCallback;
String topTitle; String topTitle;
AlertBottomWidget(
{Key? key,
required this.items,
required this.chooseCallback,
required this.topTitle})
: super(key: key);
List<Widget> itemsWidget(context) { List<Widget> itemsWidget(context) {
List<Widget> list = []; List<Widget> list = [];
@ -92,9 +89,8 @@ class AlertBottomWidget extends StatelessWidget {
style: ButtonStyle( style: ButtonStyle(
overlayColor: MaterialStateProperty.all<Color>(Colors.white)), overlayColor: MaterialStateProperty.all<Color>(Colors.white)),
child: Text( child: Text(
TranslationLoader.lanKeys!.cancel!.tr, '取消'.tr,
style: style: TextStyle(color: Colors.black, fontSize: ScreenUtil().setSp(24)),
TextStyle(color: Colors.black, fontSize: ScreenUtil().setSp(24)),
), ),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);

View File

@ -26,7 +26,7 @@ class ShowIosTipView extends StatelessWidget {
content: Text(tipTitle!), content: Text(tipTitle!),
actions: [ actions: [
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr), child: Text('取消'.tr),
onPressed: () { onPressed: () {
if (cancelClick != null) { if (cancelClick != null) {
cancelClick!(); cancelClick!();

View File

@ -21,7 +21,7 @@ class ShowSelectDateTime {
context, context,
onMonthChangeStartWithFirstDate: true, onMonthChangeStartWithFirstDate: true,
pickerTheme: DateTimePickerTheme( pickerTheme: DateTimePickerTheme(
cancel: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black)), cancel: Text('取消'.tr, style: const TextStyle(color: Colors.black)),
showTitle: true, showTitle: true,
confirm: Text('确定'.tr, style: const TextStyle(color: Colors.black)), confirm: Text('确定'.tr, style: const TextStyle(color: Colors.black)),
), ),

View File

@ -77,7 +77,7 @@ class ShowTFView extends StatelessWidget {
), ),
actions: <Widget>[ actions: <Widget>[
CupertinoDialogAction( CupertinoDialogAction(
child: Text(leftBtnTitle ?? TranslationLoader.lanKeys!.cancel!.tr, child: Text(leftBtnTitle ?? '取消'.tr,
style: TextStyle(color: AppColors.mainColor)), style: TextStyle(color: AppColors.mainColor)),
onPressed: () { onPressed: () {
// Navigator.pop(context); // Navigator.pop(context);

View File

@ -53,7 +53,7 @@ class ShowTipView {
), ),
actions: <Widget>[ actions: <Widget>[
CupertinoDialogAction( CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr), child: Text('取消'.tr),
onPressed: Get.back, onPressed: Get.back,
), ),
CupertinoDialogAction( CupertinoDialogAction(

View File

@ -77,8 +77,9 @@ class LanKeyEntity {
// this.share, // this.share,
// this.amend, // this.amend,
// this.sure, // this.sure,
this.cancel, // this.cancel,
this.add,
// this.add,
this.accountNumber, this.accountNumber,
this.volumeAuthorizationLock, this.volumeAuthorizationLock,
this.authorizedAdminTip, this.authorizedAdminTip,
@ -537,8 +538,8 @@ class LanKeyEntity {
// share = json['share']; // share = json['share'];
// amend = json['amend']; // amend = json['amend'];
// sure = json['sure']; // sure = json['sure'];
cancel = json['cancel']; // cancel = json['cancel'];
add = json['add']; // add = json['add'];
accountNumber = json['accountNumber']; accountNumber = json['accountNumber'];
volumeAuthorizationLock = json['volumeAuthorizationLock']; volumeAuthorizationLock = json['volumeAuthorizationLock'];
authorizedAdminTip = json['authorizedAdminTip']; authorizedAdminTip = json['authorizedAdminTip'];
@ -1046,8 +1047,8 @@ class LanKeyEntity {
// String? share; // String? share;
// String? amend; // String? amend;
// String? sure; // String? sure;
String? cancel; // String? cancel;
String? add; // String? add;
String? accountNumber; String? accountNumber;
String? volumeAuthorizationLock; String? volumeAuthorizationLock;
String? authorizedAdminTip; String? authorizedAdminTip;
@ -1544,8 +1545,8 @@ class LanKeyEntity {
// map['share'] = share; // map['share'] = share;
// map['amend'] = amend; // map['amend'] = amend;
// map['sure'] = sure; // map['sure'] = sure;
map['cancel'] = cancel; // map['cancel'] = cancel;
map['add'] = add; // map['add'] = add;
map['accountNumber'] = accountNumber; map['accountNumber'] = accountNumber;
map['volumeAuthorizationLock'] = volumeAuthorizationLock; map['volumeAuthorizationLock'] = volumeAuthorizationLock;
map['authorizedAdminTip'] = authorizedAdminTip; map['authorizedAdminTip'] = authorizedAdminTip;