From 0de849f4cfa903fb568cd6c8e8a1eb3cf2878726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=B0=91=E9=98=B3?= <786612630@qq.com> Date: Fri, 26 Jul 2024 09:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=88=B0cancel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lan/lan_en.json | 126 ++--- lan/lan_keys.json | 116 ++-- lan/lan_zh.json | 126 ++--- .../starLock_forgetPassword_page.dart | 5 +- .../starLock_forgetPassword_xhj_page.dart | 4 +- lib/login/login/starLock_login_page.dart | 3 +- lib/login/login/starLock_login_xhj_page.dart | 3 +- .../register/starLock_register_page.dart | 4 +- .../register/starLock_register_xhj_page.dart | 41 +- .../authorizedAdmin/authorizedAdmin_page.dart | 21 +- .../volumeAuthorizationLockManage_tabbar.dart | 13 +- .../volumeAuthorizationLock_page.dart | 16 +- .../card/addCardType/addCardType_page.dart | 29 +- .../card/cardDetail/cardDetail_page.dart | 14 +- .../card/cardList/cardList_page.dart | 3 +- .../otherTypeKeyChangeDate_page.dart | 9 +- .../otherTypeKeyChangeValidityDate_page.dart | 14 +- .../checkingInDetail_page.dart | 14 +- .../checkingInAddHolidays_page.dart | 4 +- .../checkingInDeletHolidays_page.dart | 4 +- .../checkingInSetHolidays_page.dart | 2 +- .../checkingInList/checkingInList_page.dart | 2 +- .../checkingInSet/checkingInSet_page.dart | 3 +- .../checkingInSetWorkTime_page.dart | 2 +- .../checkingInSetWorkdaySet_page.dart | 18 +- .../checkingInAddStaff_page.dart | 12 +- .../checkingInStaffDetail_page.dart | 2 +- .../batchExportLog/batchExportLog_page.dart | 8 +- .../electronicKeyDetailChangeDate_page.dart | 29 +- .../electronicKeyPeriodValidity_page.dart | 49 +- .../electronicKeyList_page.dart | 4 +- .../massSendElectronicKey_page.dart | 18 +- .../massSendElectronicKeyManage_page.dart | 2 +- .../massSendElectronicKeyManage_tabbar.dart | 16 +- .../massSendLockGroupList_page.dart | 2 +- .../massSendReceiverCell.dart | 9 +- .../massSendReceiver_page.dart | 2 +- .../sendElectronicKey_page.dart | 10 +- .../view/sendElectronicKeyView_page.dart | 68 +-- .../face/addFaceType/addFaceType_page.dart | 29 +- .../face/faceDetail/faceDetail_page.dart | 14 +- .../face/faceList/faceList_page.dart | 2 +- .../addFingerprintType_page.dart | 28 +- .../fingerprintDetail_page.dart | 14 +- .../fingerprintList/fingerprintList_page.dart | 2 +- .../lockDetail/iris/addIris/addIris_page.dart | 17 +- .../addIrisTypeManage_page.dart | 16 +- .../addIrisTypeManage_tabbar.dart | 34 +- .../iris/addIrisType/addIrisType_page.dart | 85 ++- .../iris/irisDetail/irisDetail_page.dart | 31 +- .../iris/irisList/irisList_page.dart | 4 +- .../automaticBlocking_page.dart | 4 +- .../basicInformation_page.dart | 2 +- .../checkInCreatCompany_page.dart | 73 ++- .../configuringWifi/configuringWifi_page.dart | 2 +- .../ImportOtherLockData_page.dart | 4 +- .../lockSet/lockSet/lockSet_page.dart | 4 +- .../markedHouseState_page.dart | 2 +- .../normallyOpenMode_page.dart | 24 +- .../unlockQRCode/unlockQRCode_page.dart | 2 +- .../wirelessKeyboard_page.dart | 4 +- .../messageWarn/addFamily/addFamily_page.dart | 3 +- .../notificationMode_page.dart | 4 +- .../lockDetail/palm/addPalm/addPalm_page.dart | 18 +- .../addPalmTypeManage_page.dart | 16 +- .../addPalmTypeManage_tabbar.dart | 34 +- .../palm/addPalmType/addPalmType_page.dart | 83 ++- .../palm/palmDetail/palmDetail_page.dart | 59 +- .../palm/palmList/palmList_page.dart | 4 +- .../passwordKeyDetail_page.dart | 21 +- .../passwordKeyDetailChangeDate_page.dart | 8 +- .../passwordKeyList/passwordKeyList_page.dart | 4 +- .../passwordKey_perpetual_page.dart | 58 +- .../addRemoteControlType_page.dart | 29 +- .../remoteControlDetail_page.dart | 19 +- .../remoteControlList_page.dart | 2 +- .../lockMian/lockList/lockList_logic.dart | 2 +- lib/mine/addLock/saveLock/saveLock_page.dart | 2 +- .../gatewayConfigurationWifi_page.dart | 8 +- .../gatewayDetail/gatewayDetail_page.dart | 19 +- lib/mine/mine/safeVerify/safeVerify_page.dart | 2 +- .../mineUnbindPhoneOrEmail_page.dart | 7 +- .../minePersonInfoEditAccountNext_page.dart | 8 +- .../minePersonInfoEditIphone_page.dart | 6 +- .../minePersonInfoEditName_page.dart | 2 +- .../mineBindPhoneOrEmail_page.dart | 8 +- .../minePersonInfoSetSafetyProblem_page.dart | 2 +- .../minePersonInfoViewSafetyProblem_page.dart | 4 +- ...ppUnlockNeedMobileNetworkingLock_page.dart | 2 +- .../authorityManagement_page.dart | 55 +- ...dAuthorizedAdministratorManage_tabbar.dart | 16 +- .../addAuthorizedAdministrator_logic.dart | 2 +- .../addAuthorizedAdministrator_page.dart | 22 +- .../adminDetailChangeDate_page.dart | 9 +- .../administratorDetails_page.dart | 11 +- .../groupEditLock/groupEditLock_page.dart | 4 +- .../lockItemList_page.dart | 2 +- .../lockGroupList/lockGroupList_page.dart | 6 +- .../expireKeyChangeDate_page.dart | 9 +- .../expireKeyChangeValidityDate_page.dart | 14 +- .../lockUserManageList_page.dart | 2 +- .../recipientInformation_logic.dart | 2 +- .../valueAddedServicesHighFunction_page.dart | 4 +- .../valueAddedServicesList_page.dart | 5 +- .../newSMSTemplate_page.dart | 6 +- .../seletKeyCyclicDate_page.dart | 16 +- lib/tools/showIosTipView.dart | 2 +- lib/tools/showSeletDateTime.dart | 2 +- lib/tools/showTFView.dart | 4 +- lib/tools/showTipView.dart | 4 +- lib/translations/lanKeyEntity.dart | 521 +++++++++--------- lib/versionUndate/versionUndateTool.dart | 4 +- 112 files changed, 1105 insertions(+), 1275 deletions(-) diff --git a/lan/lan_en.json b/lan/lan_en.json index d1f5dc3f..3627dc85 100755 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -11,72 +11,53 @@ "指纹号": "Fingerprint Number", "遥控": "Remote Control", "添加人脸": "添加人脸", + "门锁日志": "Door lock log", + "密码号": "Password Number", + "添加者": "Adder", + "添加时间": "Add Time", + "重置": "Reset", + "请输入手机号或者邮箱": "Please enter the number or email", + "工作时间": "Working Time", + "工作日设置": "Workday Settings", + "星期一": "Monday", + "星期二": "Tuesday", + "星期三": "Wednesday", + "星期四": "Thursday", + "星期五": "Friday", + "星期六": "Saturday", + "星期日": "Sunday", + + "简写周一": "M", + "简写周二": "T", + "简写周三": "W", + "简写周四": "T", + "简写周五": "F", + "简写周六": "S", + "简写周日": "S", + + "周一": "Mon", + "周二": "Tue", + "周三": "Wed", + "周四": "Thu", + "周五": "Fri", + "周六": "Sat", + "周日": "Sun", + + "群发钥匙": "Send Group Key", + "锁": "Lock", + "请添加": "Please Add", + "允许远程开锁": "Remote Unlocking Allowed", + "请输入验证码": "Please enter the verification code", + "获取密码": "Get Password", + "请给密码命名": "Please Name Your Password", + "密码有限期为6个小时,只能使用一次": "The password is valid for 6 hours and can only be used once", + "手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加": "Manually enter 6-9 digits as the password. Can be added by phone Bluetooth next to the lock, or remotely added through the gateway", + "获取": "Get", + "添加": "Add", + "删除公司": "Delete Company", + "密码详情": "Password Detail", + "修改密码": "Modify Password", - "doorLockLog": "Door lock log", - "number": "Number", - "additive": "Additive", - "addTime": "Add Time", - "reset": "Reset", - "sendKey": "SendKey", - "timeLimit": "TimeLimit", - "permanent": "Permanent", - "once": "Once", - "circulation": "Circulation", - "receiver": "Receiver", - "pleaseEnterNumberOrEmail": "Please enter the number or email", - "name": "Name", - "enterYourName": "Please Enter Your Name", - "effectiveTime": "Effective Time", - "failureTime": "Failure Time", - "effectiveDate": "Effective Date", - "failureDate": "Failure Date", - "monday": "Monday", - "tuesday": "Tuesday", - "wednesday": "Wednesday", - "thursday": "Thursday", - "friday": "Friday", - "saturday": "Saturday", - "sunday": "Sunday", - "mondayShort": "M", - "tuesdayShort": "T", - "wednesdayShort": "W", - "thursdayShort": "T", - "fridayShort": "F", - "saturdayShort": "S", - "sundayShort": "S", - "realNameAuthentication": "RealNameAuthentication", - "sendKeyBottomTip": "The recipient can use it unlimited times during the validity period", - "send": "Send", - "periodValidity": "PeriodValidity", - "sendGroupKey": "Send Group Key", - "lock": "Lock", - "pleaseAdd": "Please Add", - "pleaseSelect": "Please Select", - "remoteUnlockingAllowed": "Remote Unlocking Allowed", - "pleaseEnter": "Please Enter", - "getPassword": "Get Password", - "custom": "Custom", - "clearAll": "ClearAll", - "recursiveDevice": "Recursive Device", - "pleaseNameYourPassword": "Please Name Your Password", - "pleaseEnterDigitsNumber": "pleaseEnter6", - "getPasswordTip1": "The password must be used at least once in the last 24 hours, otherwise it is invalid\n", - "getPasswordTip2": "The password can be used for an unlimited number of times in the next period. The password must be used at least once within 24 hours after it takes effect, otherwise it will be invalid\n", - "getPasswordTip3": "The password is valid for 6 hours and can only be used once\n", - "getPasswordTip4": "It can be added next to the lock via Bluetooth on the phone or remotely via the gateway\n", - "getPasswordTip5": "The password must be used at least once within the first 24 hours, otherwise it will be invalid\n", - "getPasswordTip6": "The password is valid for 24 hours. Entering it on the lock invalidates all previously used passwords\n", - "getTip": "Get", - "addTip": "Add", - "sender": "Sender", - "senderTime": "Sender Time", - "keyDetail": "Key Detail", - "detail": "Detail", - "delete": "Delete", - "passwordDetail": "Password Detail", - "share": "Share", - "amend": "Amend", - "sure": "Sure", "cancel": "Cancel", "add": "Add", "accountNumber": "AccountNumber", @@ -517,13 +498,7 @@ "工作日": "Workday", "每日": "Daily", "周末": "Weekend", - "周一": "Monday", - "周二": "Tuesday", - "周三": "Wednesday", - "周四": "Thursday", - "周五": "Friday", - "周六": "Saturday", - "周日": "Sunday", + "确定要删除吗?": "Are you sure you want to delete?", "该锁的密码都将被删除": "The password of the lock will be deleted", "已过期": "Expired", @@ -859,13 +834,6 @@ "请选择有效日": "Please select the effective day", "公司名字长度不能小于 6 ": "The length of the company name cannot be less than 6", "已是最新版本": "It is the latest version", - "一": "Mon", - "二": "Tue", - "三": "Wed", - "四": "Thu", - "五": "Fri", - "六": "Sat", - "日": "Sun", "新建短信模版":"New SMS template", "新建邮件模版":"New email template", diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 77799a11..b30d9a75 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -11,74 +11,53 @@ "指纹号": "指纹号", "遥控": "遥控", "添加人脸": "添加人脸", + "门锁日志":"门锁日志", + "密码号": "密码号", + "添加者":"添加者", + "添加时间":"添加时间", + "重置":"重置", + "请输入手机号或者邮箱":"请输入手机号或者邮箱", + "工作时间": "工作时间", + "工作日设置": "工作日设置", + "星期一": "星期一", + "星期二": "星期二", + "星期三": "星期三", + "星期四": "星期四", + "星期五": "星期五", + "星期六": "星期六", + "星期日": "星期日", - "doorLockLog":"doorLockLog", - "number":"number", - "additive":"additive", - "addTime":"addTime", + "简写周一": "简写周一", + "简写周二": "简写周二", + "简写周三": "简写周三", + "简写周四": "简写周四", + "简写周五": "简写周五", + "简写周六": "简写周六", + "简写周日": "简写周日", - "reset":"reset", - "sendKey":"sendKey", - "timeLimit":"timeLimit", - "permanent":"permanent", - "once":"once", - "circulation":"circulation", - "receiver":"receiver", - "pleaseEnterNumberOrEmail":"pleaseEnterNumberOrEmail", - "name":"name", - "enterYourName":"enterYourName", - "effectiveTime":"effectiveTime", - "failureTime":"failureTime", - "effectiveDate":"effectiveDate", - "failureDate":"failureDate", - "monday":"monday", - "tuesday":"tuesday", - "wednesday":"wednesday", - "thursday":"thursday", - "friday":"friday", - "saturday":"saturday", - "sunday":"sunday", - "mondayShort":"mondayShort", - "tuesdayShort":"tuesdayShort", - "wednesdayShort":"wednesdayShort", - "thursdayShort":"thursdayShort", - "fridayShort":"fridayShort", - "saturdayShort":"saturdayShort", - "sundayShort":"sundayShort", + "周一": "周一", + "周二": "周二", + "周三": "周三", + "周四": "周四", + "周五": "周五", + "周六": "周六", + "周日": "周日", + + "群发钥匙":"群发钥匙", + "锁": "锁", + "请添加":"请添加", + "允许远程开锁":"允许远程开锁", + "请输入验证码": "请输入验证码", + "获取密码": "获取密码", + "请给密码命名":"请给密码命名", + "密码有限期为6个小时,只能使用一次":"密码有限期为6个小时,只能使用一次", + "手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加":"手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加", + "获取": "获取", + "添加":"添加", + "删除公司": "删除公司", + "密码详情": "密码详情", + "修改密码": "修改密码", - "realNameAuthentication":"realNameAuthentication", - "sendKeyBottomTip":"sendKeyBottomTip", - "send":"send", - "periodValidity":"periodValidity", - "sendGroupKey":"sendGroupKey", - "lock":"lock", - "pleaseAdd":"pleaseAdd", - "pleaseSelect":"pleaseSelect", - "remoteUnlockingAllowed":"remoteUnlockingAllowed", - "pleaseEnter":"pleaseEnter", - "getPassword":"getPassword", - "custom":"custom", - "clearAll":"clearAll", - "recursiveDevice":"recursiveDevice", - "pleaseNameYourPassword":"pleaseNameYourPassword", - "pleaseEnterDigitsNumber":"pleaseEnter6", - "getPasswordTip1":"getPasswordTip1", - "getPasswordTip2":"getPasswordTip2", - "getPasswordTip3":"getPasswordTip3", - "getPasswordTip4":"getPasswordTip4", - "getPasswordTip5":"getPasswordTip5", - "getPasswordTip6":"getPasswordTip6", - "getTip":"getTip", - "addTip":"addTip", - "sender":"sender", - "senderTime":"senderTime", - "keyDetail":"keyDetail", - "detail":"detail", - "delete":"delete", - "passwordDetail":"passwordDetail", - "share":"share", - "amend":"amend", - "sure":"sure", "cancel":"cancel", "add":"add", "accountNumber":"accountNumber", @@ -542,13 +521,6 @@ "工作日": "工作日", "每日": "每日", "周末": "周末", - "周一": "周一", - "周二": "周二", - "周三": "周三", - "周四": "周四", - "周五": "周五", - "周六": "周六", - "周日": "周日", "确定要删除吗?": "确定要删除吗?", "该锁的密码都将被删除": "该锁的密码都将被删除", "已过期": "已过期", diff --git a/lan/lan_zh.json b/lan/lan_zh.json index 950249a0..ea4843b2 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -11,72 +11,53 @@ "指纹号": "指纹号", "遥控": "遥控", "添加人脸": "添加人脸", + "门锁日志": "门锁日志", + "密码号": "密码号", + "添加者": "添加者", + "添加时间": "添加时间", + "重置": "重置", + "请输入手机号或者邮箱": "请输入手机号或者邮箱", + "工作时间": "工作时间", + "工作日设置": "工作日设置", + "星期一": "星期一", + "星期二": "星期二", + "星期三": "星期三", + "星期四": "星期四", + "星期五": "星期五", + "星期六": "星期六", + "星期日": "星期日", + + "简写周一": "一", + "简写周二": "二", + "简写周三": "三", + "简写周四": "四", + "简写周五": "五", + "简写周六": "六", + "简写周日": "日", + + "周一": "周一", + "周二": "周二", + "周三": "周三", + "周四": "周四", + "周五": "周五", + "周六": "周六", + "周日": "周日", + + "群发钥匙": "群发钥匙", + "锁": "锁", + "请添加": "请添加", + "允许远程开锁": "允许远程开锁", + "请输入验证码": "请输入验证码", + "获取密码": "获取密码", + "请给密码命名": "请给密码命名", + "密码有限期为6个小时,只能使用一次": "密码有限期为6个小时,只能使用一次", + "手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加": "手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加", + "获取": "获取", + "添加": "添加", + "删除公司": "删除公司", + "密码详情": "密码详情", + "修改密码": "修改密码", - "doorLockLog": "门锁日志", - "number": "号", - "additive": "添加者", - "addTime": "添加时间", - "reset": "重置", - "sendKey": "发送钥匙", - "timeLimit": "限时", - "permanent": "永久", - "once": "单次", - "circulation": "循环", - "receiver": "接收者", - "pleaseEnterNumberOrEmail": "请输入手机号或者邮箱", - "name": "姓名", - "enterYourName": "请输入姓名", - "effectiveTime": "生效时间", - "failureTime": "失效时间", - "effectiveDate": "生效日期", - "failureDate": "失效日期", - "monday": "星期一", - "tuesday": "星期二", - "wednesday": "星期三", - "thursday": "星期四", - "friday": "星期五", - "saturday": "星期六", - "sunday": "星期日", - "mondayShort": "一", - "tuesdayShort": "二", - "wednesdayShort": "三", - "thursdayShort": "四", - "fridayShort": "五", - "saturdayShort": "六", - "sundayShort": "日", - "realNameAuthentication": "实名认证", - "sendKeyBottomTip": "接收者在有效期内可以不限次数使用", - "send": "发送", - "periodValidity": "有效期", - "sendGroupKey": "群发钥匙", - "lock": "锁", - "pleaseAdd": "请添加", - "pleaseSelect": "请选择", - "remoteUnlockingAllowed": "允许远程开锁", - "pleaseEnter": "请输入", - "getPassword": "获取密码", - "custom": "自定义", - "clearAll": "清空", - "recursiveDevice": "循环方式", - "pleaseNameYourPassword": "请给密码命名", - "pleaseEnterDigitsNumber": "请输入6-9位数字", - "getPasswordTip1": "密码在24小时内至少要使用过一次,否则将无效", - "getPasswordTip2": "限时密码可以在有效期内不限次数使用 \n密码在生效后的24小时内至少要使用过一次,否则将失效", - "getPasswordTip3": "密码有限期为6个小时,只能使用一次", - "getPasswordTip4": "手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加", - "getPasswordTip5": "限时密码可以再有下期内不限次数使用 \n密码在生效后的24小时内至少要使用过一次,否则将失效", - "getPasswordTip6": "密码有效期为24小时,在锁上输入后,将使之前使用过的密码都失效", - "getTip": "获取", - "addTip": "添加", - "sender": "发送人", - "senderTime": "发送时间", - "keyDetail": "钥匙详情", - "detail": "详情", - "delete": "删除", - "passwordDetail": "密码详情", - "share": "分享", - "amend": "修改", - "sure": "确定", "cancel": "取消", "add": "添加", "accountNumber": "账号", @@ -515,13 +496,6 @@ "工作日": "工作日", "每日": "每日", "周末": "周末", - "周一": "周一", - "周二": "周二", - "周三": "周三", - "周四": "周四", - "周五": "周五", - "周六": "周六", - "周日": "周日", "确定要删除吗?": "确定要删除吗?", "该锁的密码都将被删除": "该锁的密码都将被删除", "已过期": "已过期", @@ -857,13 +831,7 @@ "请选择有效日": "请选择有效日", "公司名字长度不能小于 6 ": "公司名字长度不能小于 6 ", "已是最新版本": "已是最新版本", - "一": "一", - "二": "二", - "三": "三", - "四": "四", - "五": "五", - "六": "六", - "日": "日", + "无考勤记录": "无考勤记录", "大家干劲十足": "大家干劲十足", "工作时长未出炉": "工作时长未出炉", diff --git a/lib/login/forgetPassword/starLock_forgetPassword_page.dart b/lib/login/forgetPassword/starLock_forgetPassword_page.dart index eba5eee9..57684f35 100755 --- a/lib/login/forgetPassword/starLock_forgetPassword_page.dart +++ b/lib/login/forgetPassword/starLock_forgetPassword_page.dart @@ -105,8 +105,7 @@ class _StarLockForgetPasswordPageState height: 36.w, ), ), - hintText: - TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + hintText:'请输入手机号或者邮箱'.tr, keyboardType: TextInputType.number, inputFormatters: [ LengthLimitingTextInputFormatter(30), @@ -177,7 +176,7 @@ class _StarLockForgetPasswordPageState height: 30.w, ), ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}", + hintText: '请输入验证码'.tr, inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), diff --git a/lib/login/forgetPassword/starLock_forgetPassword_xhj_page.dart b/lib/login/forgetPassword/starLock_forgetPassword_xhj_page.dart index 9baf9798..a0dc857e 100755 --- a/lib/login/forgetPassword/starLock_forgetPassword_xhj_page.dart +++ b/lib/login/forgetPassword/starLock_forgetPassword_xhj_page.dart @@ -88,7 +88,7 @@ class _StarLockForgetPasswordPageState leftWidget: Padding( padding: EdgeInsets.only(top: 30.w, bottom: 20.w, left: 5.w), ), - label: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + label: '请输入手机号或者邮箱'.tr, keyboardType: TextInputType.number, inputFormatters: [ LengthLimitingTextInputFormatter(30), @@ -137,7 +137,7 @@ class _StarLockForgetPasswordPageState }, leftWidget: SizedBox(), hintText: - '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}', + '请输入验证码'.tr, inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), diff --git a/lib/login/login/starLock_login_page.dart b/lib/login/login/starLock_login_page.dart index ef178693..3dd07ba8 100755 --- a/lib/login/login/starLock_login_page.dart +++ b/lib/login/login/starLock_login_page.dart @@ -120,8 +120,7 @@ class _StarLockLoginPageState extends State { height: 36.w, ), ), - hintText: - TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + hintText:'请输入手机号或者邮箱'.tr, // keyboardType: TextInputType.number, inputFormatters: [ // FilteringTextInputFormatter.allow(RegExp('[0-9]')), diff --git a/lib/login/login/starLock_login_xhj_page.dart b/lib/login/login/starLock_login_xhj_page.dart index 4ef9a0a0..4f23fb50 100755 --- a/lib/login/login/starLock_login_xhj_page.dart +++ b/lib/login/login/starLock_login_xhj_page.dart @@ -126,8 +126,7 @@ class _StarLockLoginPageState extends State { icon: const Icon(Icons.close), onPressed: () {}, ), - label: TranslationLoader - .lanKeys!.pleaseEnterNumberOrEmail!.tr, + label: '请输入手机号或者邮箱'.tr, // keyboardType: TextInputType.number, inputFormatters: [ LengthLimitingTextInputFormatter(30), diff --git a/lib/login/register/starLock_register_page.dart b/lib/login/register/starLock_register_page.dart index 9960861e..6f844e29 100755 --- a/lib/login/register/starLock_register_page.dart +++ b/lib/login/register/starLock_register_page.dart @@ -216,7 +216,7 @@ class _StarLockRegisterPageState extends State { ), ), hintText: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}", + "${"请输入".tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}", keyboardType: TextInputType.number, inputFormatters: [ // FilteringTextInputFormatter.allow(RegExp('[0-9]')), @@ -285,7 +285,7 @@ class _StarLockRegisterPageState extends State { ), ), hintText: - '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}', + '请输入验证码'.tr, inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), diff --git a/lib/login/register/starLock_register_xhj_page.dart b/lib/login/register/starLock_register_xhj_page.dart index 493e1ad7..39f8631c 100755 --- a/lib/login/register/starLock_register_xhj_page.dart +++ b/lib/login/register/starLock_register_xhj_page.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/login/register/starLock_register_state.dart'; import '../../appRouters.dart'; import '../../app_settings/app_colors.dart'; @@ -21,8 +22,8 @@ class StarLockRegisterXHJPage extends StatefulWidget { } class _StarLockRegisterPageState extends State { - final logic = Get.put(StarLockRegisterLogic()); - final state = Get.find().state; + final StarLockRegisterLogic logic = Get.put(StarLockRegisterLogic()); + final StarLockRegisterState state = Get.find().state; @override Widget build(BuildContext context) { @@ -37,7 +38,7 @@ class _StarLockRegisterPageState extends State { backgroundColor: Colors.white), body: ListView( padding: EdgeInsets.only(left: 40.w, right: 40.w), - children: [ + children: [ topSelectCountryAndRegionWidget(), middleTFWidget(), _buildBottomAgreement(), @@ -69,7 +70,7 @@ class _StarLockRegisterPageState extends State { Widget topSelectCountryAndRegionWidget() { return Column( - children: [ + children: [ Container( height: 80.h, child: DefaultTabController( @@ -78,12 +79,12 @@ class _StarLockRegisterPageState extends State { onTap: (int index) { state.isIphoneType.value = index == 0; }, - overlayColor: MaterialStateProperty.resolveWith((states) { + overlayColor: MaterialStateProperty.resolveWith((Set states) { return Colors.transparent; }), dividerHeight: 0, indicatorSize: TabBarIndicatorSize.tab, - tabs: [ + tabs: [ Text(TranslationLoader.lanKeys!.iphone!.tr), Text(TranslationLoader.lanKeys!.email!.tr) ], @@ -113,7 +114,7 @@ class _StarLockRegisterPageState extends State { color: Colors.white, height: 70.h, child: Row( - children: [ + children: [ SizedBox(width: 5.w), Text(TranslationLoader.lanKeys!.countryAndRegion!.tr, style: TextStyle( @@ -136,7 +137,7 @@ class _StarLockRegisterPageState extends State { Widget middleTFWidget() { return Column( - children: [ + children: [ Obx(() => LoginInput( controller: state.phoneOrEmailController, onchangeAction: (v) { @@ -144,9 +145,9 @@ class _StarLockRegisterPageState extends State { }, leftWidget: SizedBox(), label: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}", + "${'请输入'.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}", keyboardType: TextInputType.number, - inputFormatters: [ + inputFormatters: [ LengthLimitingTextInputFormatter(30), ])), LoginInput( @@ -157,7 +158,7 @@ class _StarLockRegisterPageState extends State { isPwd: true, leftWidget: SizedBox(), label: '请输入密码'.tr, - inputFormatters: [ + inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), Text( @@ -173,11 +174,11 @@ class _StarLockRegisterPageState extends State { isPwd: true, leftWidget: SizedBox(), label: '确认密码'.tr, - inputFormatters: [ + inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), Row( - children: [ + children: [ Expanded( child: LoginInput( controller: state.codeController, @@ -185,8 +186,8 @@ class _StarLockRegisterPageState extends State { logic.checkNext(state.codeController); }, leftWidget: SizedBox(), - label: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}", - inputFormatters: [ + label: '请输入验证码'.tr, + inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), ), @@ -201,7 +202,7 @@ class _StarLockRegisterPageState extends State { } final result = await Get.toNamed( Routers.safetyVerificationPage, - arguments: { + arguments: { 'countryCode': state.countryCode, 'account': state.phoneOrEmailStr.value }); @@ -243,7 +244,7 @@ class _StarLockRegisterPageState extends State { padding: EdgeInsets.symmetric(vertical: 16.h), child: Row( mainAxisAlignment: MainAxisAlignment.start, - children: [ + children: [ Obx(() => Image.asset( state.agree.value ? 'images/icon_round_select.png' @@ -260,7 +261,7 @@ class _StarLockRegisterPageState extends State { text: TranslationLoader.lanKeys!.readAndAgree!.tr, style: TextStyle(color: const Color(0xff333333), fontSize: 20.sp), - children: [ + children: [ WidgetSpan( alignment: PlaceholderAlignment.middle, child: GestureDetector( @@ -269,7 +270,7 @@ class _StarLockRegisterPageState extends State { style: TextStyle( color: AppColors.mainColor, fontSize: 20.sp)), onTap: () { - Get.toNamed(Routers.webviewShowPage, arguments: { + Get.toNamed(Routers.webviewShowPage, arguments: { 'url': XSConstantMacro.userAgreementURL, 'title': '用户协议'.tr }); @@ -283,7 +284,7 @@ class _StarLockRegisterPageState extends State { style: TextStyle( color: AppColors.mainColor, fontSize: 20.sp)), onTap: () { - Get.toNamed(Routers.webviewShowPage, arguments: { + Get.toNamed(Routers.webviewShowPage, arguments: { 'url': XSConstantMacro.privacyPolicyURL, 'title': '隐私政策'.tr }); diff --git a/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart b/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart index d34eec38..0270b018 100755 --- a/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart +++ b/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart @@ -110,12 +110,11 @@ class _AuthorizedAdminPageState extends State return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.receiver!.tr, + leftTitel: '接收者'.tr, rightTitle: '', isHaveLine: true, isHaveRightWidget: true, - rightWidget: getTFWidget(true, - TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, 1)), + rightWidget: getTFWidget(true, '请输入手机号或者邮箱'.tr, 1)), CommonItem( leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr, rightTitle: '', @@ -140,11 +139,11 @@ class _AuthorizedAdminPageState extends State }, ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: '', isHaveRightWidget: true, rightWidget: getTFWidget( - false, TranslationLoader.lanKeys!.enterYourName!.tr, 2)), + false, '请输入姓名'.tr, 2)), Container(height: 10.h), ], ); @@ -155,7 +154,7 @@ class _AuthorizedAdminPageState extends State return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginDate.value, isHaveLine: true, isHaveDirection: true, @@ -171,7 +170,7 @@ class _AuthorizedAdminPageState extends State }); }), CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endDate.value, isHaveDirection: true, action: () { @@ -234,7 +233,7 @@ class _AuthorizedAdminPageState extends State height: 20.h, ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.send!.tr, + btnName: '发送'.tr, onClick: () async { final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { @@ -276,7 +275,7 @@ class _AuthorizedAdminPageState extends State return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr, + leftTitel: '实名认证'.tr, rightTitle: '', isTipsImg: true, isHaveLine: logic.state.isRequireAuth.value == true, @@ -696,8 +695,8 @@ class _AuthorizedAdminPageState extends State } final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '0'), - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '1'), + ItemView(title: '限时'.tr, type: '0'), + ItemView(title: '永久'.tr, type: '1'), ]; } diff --git a/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart b/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart index 080bde7a..d62562af 100755 --- a/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart +++ b/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart @@ -8,10 +8,10 @@ import '../../../../../translations/trans_lib.dart'; import '../volumeAuthorizationLock_page.dart'; class VolumeAuthorizationLockManageTabbar extends StatefulWidget { - var initialIndex = 1; - VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex}) + VolumeAuthorizationLockManageTabbar({required this.initialIndex, Key? key}) : super(key: key); + int initialIndex = 1; @override State createState() => @@ -24,13 +24,12 @@ class _VolumeAuthorizationLockManageTabbarState late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"), + ItemView(title: '永久'.tr, type: '0'), + ItemView(title: '限时'.tr, type: '1'), ]; @override void initState() { - // TODO: implement initState super.initState(); _tabController = TabController( vsync: this, @@ -42,7 +41,7 @@ class _VolumeAuthorizationLockManageTabbarState Widget build(BuildContext context) { return Expanded( child: Column( - children: [ + children: [ _tabBar(), _pageWidget(), ], @@ -52,7 +51,7 @@ class _VolumeAuthorizationLockManageTabbarState TabBar _tabBar() { return TabBar( controller: _tabController, - tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(), + tabs: _itemTabs.map(_tab).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, diff --git a/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart b/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart index e8d92d4d..09e671c6 100755 --- a/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart +++ b/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart @@ -91,7 +91,7 @@ class _VolumeAuthorizationLockPageState isHaveRightWidget: true, rightWidget: getTFWidget( true, - TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + '请输入手机号或者邮箱'.tr, state.emailOrPhoneController)), CommonItem( leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr, @@ -117,12 +117,12 @@ class _VolumeAuthorizationLockPageState }, ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: '', isHaveRightWidget: true, rightWidget: getTFWidget( false, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '请输入'.tr, state.keyNameController)), Container(height: 10.h), ], @@ -134,7 +134,7 @@ class _VolumeAuthorizationLockPageState return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.selectEffectiveDate.value, isHaveLine: true, isHaveDirection: true, @@ -153,7 +153,7 @@ class _VolumeAuthorizationLockPageState }); }), CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.selectFailureDate.value, isHaveDirection: true, action: () { @@ -180,9 +180,9 @@ class _VolumeAuthorizationLockPageState return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.lock!.tr, + leftTitel: '锁'.tr, rightTitle: state.lockIdList.isEmpty - ? TranslationLoader.lanKeys!.pleaseSelect!.tr + ? '请选择'.tr : state.lockIdList.length.toString(), isHaveDirection: true, action: () async { @@ -223,7 +223,7 @@ class _VolumeAuthorizationLockPageState return Column( children: [ SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/lib/main/lockDetail/card/addCardType/addCardType_page.dart b/lib/main/lockDetail/card/addCardType/addCardType_page.dart index 11721ed7..061c2aed 100755 --- a/lib/main/lockDetail/card/addCardType/addCardType_page.dart +++ b/lib/main/lockDetail/card/addCardType/addCardType_page.dart @@ -80,8 +80,8 @@ class _AddCardPageState extends State child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyBottomWidget() ], @@ -95,8 +95,8 @@ class _AddCardPageState extends State child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyTimeLimitWidget(), // SizedBox(height: 10.h), @@ -112,8 +112,8 @@ class _AddCardPageState extends State child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyCyclicDate(), SizedBox(height: 10.h), @@ -147,7 +147,7 @@ class _AddCardPageState extends State return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.timeLimitBeginTime.value, isHaveLine: true, isHaveDirection: true, @@ -161,7 +161,7 @@ class _AddCardPageState extends State }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.timeLimitEndTime.value, isHaveDirection: true, action: () { @@ -183,7 +183,7 @@ class _AddCardPageState extends State return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: '${state.cycleBeginTime.value}\n${state.cycleEndTime.value}', isHaveDirection: true, @@ -385,15 +385,14 @@ class _AddCardPageState extends State } final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'), - ItemView( - title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), + ItemView(title: '循环'.tr, selectType: '2'), ]; final List _fromCheckInTypeItemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), ]; TabBar _tabBar() { diff --git a/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart b/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart index b075427b..f2084d4a 100755 --- a/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart +++ b/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart @@ -46,12 +46,10 @@ class _CardDetailPageState extends State with RouteAware { rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => lockDataListItem( - TranslationLoader.lanKeys!.name!.tr, state.typeName.value, - () { + Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () { ShowTipView().showTFViewAlertDialog( state.changeNameController, - '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}', + '请输入姓名'.tr, '', () { if (state.changeNameController.text.isEmpty) { logic.showToast('请输入姓名'.tr); @@ -70,7 +68,7 @@ class _CardDetailPageState extends State with RouteAware { state.keyType.value == 2 || state.keyType.value == 1, child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, allHeight: 70.h, rightTitle: logic.getKeyTypeShowDateTime(), isHaveDirection: true, @@ -164,12 +162,12 @@ class _CardDetailPageState extends State with RouteAware { })))), Container(height: 10.h), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.additive!.tr, + leftTitel: '添加者'.tr, isHaveLine: true, rightTitle: state.adder.value, )), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.addTime!.tr, + leftTitel: '添加时间'.tr, rightTitle: DateTool() .dateToYMDHNString(state.addTime.value.toString()), )), @@ -206,7 +204,7 @@ class _CardDetailPageState extends State with RouteAware { // addControlsBtn(type), SizedBox(height: 30.h), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, margin: EdgeInsets.only( diff --git a/lib/main/lockDetail/card/cardList/cardList_page.dart b/lib/main/lockDetail/card/cardList/cardList_page.dart index b04ab445..8dba8e5b 100755 --- a/lib/main/lockDetail/card/cardList/cardList_page.dart +++ b/lib/main/lockDetail/card/cardList/cardList_page.dart @@ -62,8 +62,7 @@ class _CardListPageState extends State with RouteAware { backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text( - TranslationLoader.lanKeys!.reset!.tr, + child: Text('重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { diff --git a/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_page.dart b/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_page.dart index 880158a1..f60848ac 100755 --- a/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_page.dart +++ b/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_page.dart @@ -33,14 +33,13 @@ class _OtherTypeKeyChangeDatePageState extends State return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: - "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}", + barTitle: '修改有效期'.tr, haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.sure!.tr, + '确定'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () { @@ -93,7 +92,7 @@ class _OtherTypeKeyChangeDatePageState extends State return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, @@ -108,7 +107,7 @@ class _OtherTypeKeyChangeDatePageState extends State }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { diff --git a/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_page.dart b/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_page.dart index 7bc49ece..e7927024 100755 --- a/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_page.dart +++ b/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_page.dart @@ -177,25 +177,25 @@ class _OtherTypeKeyChangeValidityDatePageState extends State { //中部周 Widget _weekHeader() { final List array = [ - TranslationLoader.lanKeys!.mondayShort!.tr, - TranslationLoader.lanKeys!.tuesdayShort!.tr, - TranslationLoader.lanKeys!.wednesdayShort!.tr, - TranslationLoader.lanKeys!.thursdayShort!.tr, - TranslationLoader.lanKeys!.fridayShort!.tr, - TranslationLoader.lanKeys!.saturdayShort!.tr, - TranslationLoader.lanKeys!.sundayShort!.tr + '简写周一'.tr, + '简写周二'.tr, + '简写周三'.tr, + '简写周四'.tr, + '简写周五'.tr, + '简写周六'.tr, + '简写周日'.tr ]; return SizedBox( height: 50.h, diff --git a/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart b/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart index 45318c4e..91535149 100755 --- a/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart @@ -38,7 +38,7 @@ class _CheckingInAddHolidaysPageState extends State { body: Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: '', isHaveLine: true, isHaveRightWidget: true, @@ -112,7 +112,7 @@ class _CheckingInAddHolidaysPageState extends State { height: 50.w, ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInDeletHolidays/checkingInDeletHolidays_page.dart b/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInDeletHolidays/checkingInDeletHolidays_page.dart index 9f57c36c..74608576 100755 --- a/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInDeletHolidays/checkingInDeletHolidays_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInDeletHolidays/checkingInDeletHolidays_page.dart @@ -33,7 +33,7 @@ class _CheckingInDeletHolidaysPageState extends State[ TextButton( child: Text( - TranslationLoader.lanKeys!.delete!.tr, + '删除'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: logic.deletStaffLoadData, @@ -54,7 +54,7 @@ class _CheckingInDeletHolidaysPageState extends State Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: state.listItem.value.vacationName, isHaveLine: true), CommonItem( diff --git a/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart b/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart index eece3717..8176833b 100755 --- a/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart @@ -237,7 +237,7 @@ class _CheckingInSetHolidaysPageState extends State { child: Container( alignment: Alignment.center, padding: const EdgeInsets.only(left: 22, right: 12), - child: Text(TranslationLoader.lanKeys!.sure!.tr, + child: Text('确定'.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)), ), ), diff --git a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart index c5ba3d35..20ad51cb 100755 --- a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart @@ -536,7 +536,7 @@ class _CheckingInListPageState extends State { normalIndex: 0, title: TranslationLoader.lanKeys!.rankingList!.tr, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, - sureTitle: TranslationLoader.lanKeys!.sure!.tr, + sureTitle: '确定'.tr, //要显示的列表 //可自定义数据适配器 //adapter: PickerAdapter(), diff --git a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart index f4a0795e..f96de974 100755 --- a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart @@ -112,8 +112,7 @@ class _CheckingInSetPageState extends State { Visibility( visible: state.getKeyInfosData.value.isLockOwner == 1, child: SubmitBtn( - btnName: - '${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}', + btnName: '删除公司'.tr, borderRadius: 20.w, fontSize: 32.sp, isDelete: true, diff --git a/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart b/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart index 77d3282b..fde37ccc 100755 --- a/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart @@ -79,7 +79,7 @@ class _CheckingInSetWorkTimePageState extends State { height: 30.h, ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, fontSize: 32.sp, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), diff --git a/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart b/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart index 594ae4ed..c5279af1 100755 --- a/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart @@ -39,7 +39,7 @@ class _CheckingInSetWorkdaySetState extends State { SizedBox(height: 50.h,), Container( margin: EdgeInsets.only(left: 20.w, right: 20.w), - child: SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () { + child: SubmitBtn(btnName: '确定'.tr, onClick: () { if(state.pushType.value == '2'){ logic.editCheckInSetInfoData(); }else{ @@ -78,7 +78,7 @@ class _CheckingInSetWorkdaySetState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Center(child: Text(TranslationLoader.lanKeys!.custom!.tr, style: TextStyle(fontSize: 26.sp, color: Colors.white))), + Center(child: Text('自定义'.tr, style: TextStyle(fontSize: 26.sp, color: Colors.white))), ], ), ), @@ -177,25 +177,25 @@ class _CheckingInSetWorkdaySetState extends State { String dateStr; switch (index) { case 1: - dateStr = TranslationLoader.lanKeys!.monday!.tr; + dateStr = '星期一'.tr; break; case 2: - dateStr = TranslationLoader.lanKeys!.tuesday!.tr; + dateStr = '星期二'.tr; break; case 3: - dateStr = TranslationLoader.lanKeys!.wednesday!.tr; + dateStr = '星期三'.tr; break; case 4: - dateStr = TranslationLoader.lanKeys!.thursday!.tr; + dateStr = '星期四'.tr; break; case 5: - dateStr = TranslationLoader.lanKeys!.friday!.tr; + dateStr = '星期五'.tr; break; case 6: - dateStr = TranslationLoader.lanKeys!.saturday!.tr; + dateStr = '星期六'.tr; break; case 7: - dateStr = TranslationLoader.lanKeys!.sunday!.tr; + dateStr = '星期日'.tr; break; default: dateStr = ''; diff --git a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart index 6c70a739..bba3fb01 100755 --- a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart @@ -41,12 +41,12 @@ class _CheckingInAddStaffPageState extends State { children: [ // 姓名 CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: '', isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget( - '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.name!.tr}', + '请输入姓名'.tr, state.staffNameController)), // 选择打卡方式 Obx(() => CommonItem( @@ -111,7 +111,7 @@ class _CheckingInAddStaffPageState extends State { isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget( - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${"员工".tr}${TranslationLoader.lanKeys!.accountNumber!.tr}", + "${'请输入'.tr}${"员工".tr}${TranslationLoader.lanKeys!.accountNumber!.tr}", state.staffAccountController)), CommonItem( leftTitel: @@ -277,7 +277,7 @@ class _CheckingInAddStaffPageState extends State { }), SizedBox(height: 50.w), Obx(() => SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -366,7 +366,7 @@ class _CheckingInAddStaffPageState extends State { normalIndex: 0, title: title, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, - sureTitle: TranslationLoader.lanKeys!.sure!.tr, + sureTitle: '确定'.tr, //要显示的列表 //可自定义数据适配器 //adapter: PickerAdapter(), @@ -472,7 +472,7 @@ class _CheckingInAddStaffPageState extends State { title = TranslationLoader.lanKeys!.getKey!.tr; break; case 2: - title = TranslationLoader.lanKeys!.getPassword!.tr; + title = '获取密码'.tr; break; case 3: title = TranslationLoader.lanKeys!.getCard!.tr; diff --git a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInStaffDetail/checkingInStaffDetail_page.dart b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInStaffDetail/checkingInStaffDetail_page.dart index b9516ab6..a0a40fcc 100755 --- a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInStaffDetail/checkingInStaffDetail_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInStaffDetail/checkingInStaffDetail_page.dart @@ -49,7 +49,7 @@ class _CheckingInStaffDetailPageState extends State { body: Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: state.staffListItemData.value.staffName, isHaveLine: true)), Obx(() => CommonItem( diff --git a/lib/main/lockDetail/doorLockLog/batchExportLog/batchExportLog_page.dart b/lib/main/lockDetail/doorLockLog/batchExportLog/batchExportLog_page.dart index 973e2e9b..659dd965 100644 --- a/lib/main/lockDetail/doorLockLog/batchExportLog/batchExportLog_page.dart +++ b/lib/main/lockDetail/doorLockLog/batchExportLog/batchExportLog_page.dart @@ -40,9 +40,9 @@ class _BatchExportLogPageState extends State crossAxisAlignment: CrossAxisAlignment.center, children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.lock!.tr, + leftTitel: '锁'.tr, rightTitle: state.lockIdList.isEmpty - ? TranslationLoader.lanKeys!.pleaseSelect!.tr + ? '请选择'.tr : state.lockIdList.length.toString(), isHaveDirection: true, action: () async { @@ -87,7 +87,7 @@ class _BatchExportLogPageState extends State return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, @@ -101,7 +101,7 @@ class _BatchExportLogPageState extends State }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { diff --git a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart index 65599936..ce9dd77c 100755 --- a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart +++ b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_logic.dart'; +import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_state.dart'; import 'package:star_lock/tools/pickers/pickers.dart'; import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart'; import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart'; @@ -20,29 +21,25 @@ class ElectronicKeyDetailChangeDate extends StatefulWidget { _ElectronicKeyDetailChangeDateState(); } -class _ElectronicKeyDetailChangeDateState - extends State { - final logic = Get.put(ElectronicKeyDetailChangeDateLogic()); - final state = Get.find().state; +class _ElectronicKeyDetailChangeDateState extends State { + final ElectronicKeyDetailChangeDateLogic logic = Get.put(ElectronicKeyDetailChangeDateLogic()); + final ElectronicKeyDetailChangeDateState state = Get.find().state; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: - "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}", + barTitle: '修改有效期'.tr, haveBack: true, backgroundColor: AppColors.mainColor, - actionsList: [ + actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.sure!.tr, + '确定'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), - onPressed: () { - logic.updateKeyDateRequest(); - }, + onPressed: logic.updateKeyDateRequest, ), ], ), @@ -52,9 +49,9 @@ class _ElectronicKeyDetailChangeDateState Widget buildMainUI() { return Column( - children: [ + children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, @@ -62,21 +59,21 @@ class _ElectronicKeyDetailChangeDateState PDuration selectDate = PDuration.parse(DateTime.tryParse(state.beginTime.value)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { setState(() { state.beginTime.value = DateTool().getYMDHNDateString(p, 1); }); }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { PDuration selectDate = PDuration.parse(DateTime.tryParse(state.endTime.value)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { setState(() { state.endTime.value = DateTool().getYMDHNDateString(p, 1); }); diff --git a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart index 0142e9de..4ef35035 100755 --- a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart +++ b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyPeriodValidity/electronicKeyPeriodValidity_state.dart'; import 'package:star_lock/tools/pickers/pickers.dart'; import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart'; import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart'; @@ -23,19 +24,19 @@ class ElectronicKeyPeriodValidityPage extends StatefulWidget { class _ElectronicKeyPeriodValidityPageState extends State { - final logic = Get.put(ElectronicKeyPeriodValidityLogic()); - final state = Get.find().state; + final ElectronicKeyPeriodValidityLogic logic = Get.put(ElectronicKeyPeriodValidityLogic()); + final ElectronicKeyPeriodValidityState state = Get.find().state; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: "修改有效期".tr, + barTitle: '修改有效期'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: ListView( - children: [ + children: [ topWidget(), SizedBox(height: 10.h), middleWidget(), @@ -57,13 +58,13 @@ class _ElectronicKeyPeriodValidityPageState Widget topWidget() { return Column( - children: [ + children: [ Container( color: Colors.white, child: Column( - children: [ + children: [ Obx(() => CommonItem( - leftTitel: "生效日期".tr, + leftTitel: '生效日期'.tr, rightTitle: state.starDate.value, isHaveDirection: true, isHaveLine: true, @@ -72,13 +73,13 @@ class _ElectronicKeyPeriodValidityPageState PDuration.parse(DateTime.tryParse(state.endTime.value)); Pickers.showDatePicker(context, selectDate: selectDate, - mode: DateMode.YMD, onConfirm: (p) { + mode: DateMode.YMD, onConfirm: (PDuration p) { state.starDate.value = DateTool().getYMDHNDateString(p, 2); }); })), Obx(() => CommonItem( - leftTitel: "失效日期".tr, + leftTitel: '失效日期'.tr, rightTitle: state.endDate.value, isHaveDirection: true, action: () { @@ -86,7 +87,7 @@ class _ElectronicKeyPeriodValidityPageState PDuration.parse(DateTime.tryParse(state.endDate.value)); Pickers.showDatePicker(context, selectDate: selectDate, - mode: DateMode.YMD, onConfirm: (p) { + mode: DateMode.YMD, onConfirm: (PDuration p) { state.endDate.value = DateTool().getYMDHNDateString(p, 2); }); })), @@ -105,7 +106,7 @@ class _ElectronicKeyPeriodValidityPageState color: Colors.white, child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ + children: [ Container( height: 60.h, // color: Colors.red, @@ -121,7 +122,7 @@ class _ElectronicKeyPeriodValidityPageState crossAxisCount: 7, childAspectRatio: 1.0), itemCount: 7, physics: const NeverScrollableScrollPhysics(), - itemBuilder: (context, index) { + itemBuilder: (BuildContext context, int index) { index += 1; return btnItem(index); })), @@ -134,28 +135,28 @@ class _ElectronicKeyPeriodValidityPageState String dateStr; switch (index) { case 1: - dateStr = TranslationLoader.lanKeys!.mondayShort!.tr; + dateStr = '简写周一'.tr; break; case 2: - dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr; + dateStr = '简写周二'.tr; break; case 3: - dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr; + dateStr = '简写周三'.tr; break; case 4: - dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr; + dateStr = '简写周四'.tr; break; case 5: - dateStr = TranslationLoader.lanKeys!.fridayShort!.tr; + dateStr = '简写周五'.tr; break; case 6: - dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr; + dateStr = '简写周六'.tr; break; case 7: - dateStr = TranslationLoader.lanKeys!.sundayShort!.tr; + dateStr = '简写周日'.tr; break; default: - dateStr = ""; + dateStr = ''; break; } return GestureDetector( @@ -195,11 +196,11 @@ class _ElectronicKeyPeriodValidityPageState Widget bottomWidget() { return Column( - children: [ + children: [ Container( color: Colors.white, child: Column( - children: [ + children: [ Obx(() => CommonItem( leftTitel: "${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}", @@ -210,7 +211,7 @@ class _ElectronicKeyPeriodValidityPageState PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.starTime.value, 0)); Pickers.showDatePicker(context, selectDate: selectDate, - mode: DateMode.HM, onConfirm: (p) { + mode: DateMode.HM, onConfirm: (PDuration p) { setState(() { state.starTime.value = DateTool().getYMDHNDateString(p, 3); @@ -226,7 +227,7 @@ class _ElectronicKeyPeriodValidityPageState PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.endTime.value, 0)); Pickers.showDatePicker(context, selectDate: selectDate, - mode: DateMode.HM, onConfirm: (p) { + mode: DateMode.HM, onConfirm: (PDuration p) { setState(() { state.endTime.value = DateTool().getYMDHNDateString(p, 3); diff --git a/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart b/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart index e06e1fdd..ceb90990 100755 --- a/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart +++ b/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart @@ -60,7 +60,7 @@ class _ElectronicKeyListPageState extends State { actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { @@ -108,7 +108,7 @@ class _ElectronicKeyListPageState extends State { height: 20.h, ), AddBottomWhiteBtn( - btnName: TranslationLoader.lanKeys!.sendKey!.tr, + btnName: '发送钥匙'.tr, onClick: () { Navigator.pushNamed(context, Routers.sendElectronicKeyPage) .then((Object? val) { diff --git a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicKey_page.dart b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicKey_page.dart index 4d3ff9b2..931d3b52 100755 --- a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicKey_page.dart +++ b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicKey_page.dart @@ -154,9 +154,9 @@ class _MassSendElectronicKeyPageState extends State { return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.receiver!.tr, + leftTitel: '接收者'.tr, rightTitle: state.receiverList.value.isEmpty - ? TranslationLoader.lanKeys!.pleaseAdd!.tr + ? '请添加'.tr : state.receiverList.value.length.toString(), isHaveLine: true, isHaveDirection: true, @@ -197,9 +197,9 @@ class _MassSendElectronicKeyPageState extends State { }, ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.lock!.tr, + leftTitel: '锁'.tr, rightTitle: state.lockIdList.isEmpty - ? TranslationLoader.lanKeys!.pleaseSelect!.tr + ? '请选择'.tr : state.lockIdList.length.toString(), isHaveDirection: true, action: () async { @@ -228,7 +228,7 @@ class _MassSendElectronicKeyPageState extends State { return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, @@ -241,7 +241,7 @@ class _MassSendElectronicKeyPageState extends State { }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { @@ -260,7 +260,7 @@ class _MassSendElectronicKeyPageState extends State { return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, + leftTitel: '允许远程开锁'.tr, rightTitle: '', isHaveRightWidget: true, rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()), @@ -275,7 +275,7 @@ class _MassSendElectronicKeyPageState extends State { return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: '${state.beginTime.value}\n${state.endTime.value}', isHaveDirection: true, isHaveLine: true, @@ -356,7 +356,7 @@ class _MassSendElectronicKeyPageState extends State { return Column( children: [ SubmitBtn( - btnName: TranslationLoader.lanKeys!.send!.tr, + btnName: '发送'.tr, onClick: () { logic.massKeyChecksRequest(); }), diff --git a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart index 9c32d1c5..35218912 100755 --- a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart +++ b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart @@ -22,7 +22,7 @@ class _MassSendElectronicKeyManagePageState return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: TranslationLoader.lanKeys!.sendGroupKey!.tr, + barTitle: '群发钥匙'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: Column( diff --git a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_tabbar.dart b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_tabbar.dart index 2fdeff5d..8e9a1a69 100755 --- a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_tabbar.dart +++ b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_tabbar.dart @@ -4,14 +4,13 @@ import 'package:get/get.dart'; import '../../../../../../app_settings/app_colors.dart'; import '../../../../../../tools/CustomUnderlineTabIndicator.dart'; -import '../../../../../../translations/trans_lib.dart'; import '../massSendElectronicKey_page.dart'; class MassSendElectronicKeyManageTabbar extends StatefulWidget { - var initialIndex = 1; - MassSendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) + MassSendElectronicKeyManageTabbar({required this.initialIndex, Key? key}) : super(key: key); + int initialIndex = 1; @override State createState() => @@ -24,14 +23,13 @@ class _MassSendElectronicKeyManageTabbarState late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "2"), + ItemView(title: '限时'.tr, type: '0'), + ItemView(title: '永久'.tr, type: '1'), + ItemView(title: '循环'.tr, type: '2'), ]; @override void initState() { - // TODO: implement initState super.initState(); _tabController = TabController( vsync: this, @@ -43,7 +41,7 @@ class _MassSendElectronicKeyManageTabbarState Widget build(BuildContext context) { return Expanded( child: Column( - children: [ + children: [ _tabBar(), _pageWidget(), ], @@ -53,7 +51,7 @@ class _MassSendElectronicKeyManageTabbarState TabBar _tabBar() { return TabBar( controller: _tabController, - tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(), + tabs: _itemTabs.map(_tab).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, diff --git a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart index fe07e90b..dc5437b7 100755 --- a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart +++ b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart @@ -38,7 +38,7 @@ class _MassSendLockGroupListPageState extends State { appBar: AppBar( backgroundColor: AppColors.mainColor, title: Text( - TranslationLoader.lanKeys!.lock!.tr, + '锁'.tr, style: TextStyle( color: Colors.white, fontSize: 28.sp, diff --git a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart index 28f5d7b2..ceadf445 100755 --- a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart +++ b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart @@ -88,10 +88,9 @@ class _MassSendReceiverCellState extends State { child: Column( children: [ _buildCellWidget( - leftTitle: TranslationLoader.lanKeys!.receiver!.tr, + leftTitle: '接收者'.tr, isInputField: true, - inputHint: TranslationLoader - .lanKeys!.pleaseEnterNumberOrEmail!.tr, + inputHint: '请输入手机号或者邮箱'.tr, controller: _receiverController, isContactPickerEnabled: true, onSubmitted: (String text) { @@ -111,9 +110,9 @@ class _MassSendReceiverCellState extends State { height: 1, ), _buildCellWidget( - leftTitle: TranslationLoader.lanKeys!.name!.tr, + leftTitle: '姓名'.tr, isInputField: true, - inputHint: TranslationLoader.lanKeys!.enterYourName!.tr, + inputHint: '请输入姓名'.tr, controller: _nickNameController, isContactPickerEnabled: false, onSubmitted: (String text) { diff --git a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart index 409e0ef0..7194b393 100755 --- a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart +++ b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart @@ -40,7 +40,7 @@ class _MassSendReceiverPageState extends State { appBar: AppBar( backgroundColor: AppColors.mainColor, title: Text( - TranslationLoader.lanKeys!.receiver!.tr, + '接收者'.tr, style: TextStyle( color: Colors.white, fontSize: 28.sp, diff --git a/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart b/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart index 187a5f10..44c5368c 100755 --- a/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart +++ b/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart @@ -34,7 +34,7 @@ class _SendElectronicKeyPageState extends State return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: TranslationLoader.lanKeys!.sendKey!.tr, + barTitle: '发送钥匙'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: Column( @@ -98,10 +98,10 @@ class _SendElectronicKeyPageState extends State } final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '0'), - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '1'), - ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: '2'), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: '3'), + ItemView(title: '限时'.tr, type: '0'), + ItemView(title: '永久'.tr, type: '1'), + ItemView(title: '单次'.tr, type: '2'), + ItemView(title: '循环'.tr, type: '3'), ]; } diff --git a/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_page.dart b/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_page.dart index 36c12a05..15103080 100755 --- a/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_page.dart +++ b/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_page.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; import 'package:star_lock/app_settings/app_colors.dart'; -import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart'; import 'package:star_lock/login/login/entity/LoginEntity.dart'; import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_logic.dart'; import 'package:star_lock/network/api_repository.dart'; @@ -22,9 +22,9 @@ import 'package:star_lock/tools/submitBtn.dart'; import 'package:star_lock/translations/trans_lib.dart'; class SendElectronicKeyView extends StatefulWidget { - String type; SendElectronicKeyView({required this.type, Key? key}) : super(key: key); + String type; @override State createState() => _SendElectronicKeyViewState(); @@ -47,7 +47,7 @@ class _SendElectronicKeyViewState extends State // 限时 return SingleChildScrollView( child: Column( - children: [ + children: [ keyInfoWidget(logic), keyTimeWidget(logic), remoteUnlockingWidget(logic), @@ -60,7 +60,7 @@ class _SendElectronicKeyViewState extends State // 永久 return SingleChildScrollView( child: Column( - children: [ + children: [ keyInfoWidget(logic), remoteUnlockingWidget(logic), keyRealNameWidget(logic), @@ -72,7 +72,7 @@ class _SendElectronicKeyViewState extends State // 单次 return SingleChildScrollView( child: Column( - children: [ + children: [ keyInfoWidget(logic), remoteUnlockingWidget(logic), keyRealNameWidget(logic), @@ -84,7 +84,7 @@ class _SendElectronicKeyViewState extends State // 循环 return SingleChildScrollView( child: Column( - children: [ + children: [ keyInfoWidget(logic), keyPeriodValidityWidget(logic), remoteUnlockingWidget(logic), @@ -103,16 +103,16 @@ class _SendElectronicKeyViewState extends State // 顶部钥匙信息widget Widget keyInfoWidget(SendElectronicKeyViewLogic logic) { return Column( - children: [ + children: [ // Container(height: 10.h), CommonItem( - leftTitel: TranslationLoader.lanKeys!.receiver!.tr, + leftTitel: '接收者'.tr, rightTitle: '', isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget( true, - TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + '请输入手机号或者邮箱'.tr, 1, logic)), CommonItem( @@ -128,7 +128,7 @@ class _SendElectronicKeyViewState extends State TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), ), action: () async { - final result = await Navigator.pushNamed( + final Object? result = await Navigator.pushNamed( context, Routers.selectCountryRegionPage); if (result != null) { result as Map; @@ -139,11 +139,11 @@ class _SendElectronicKeyViewState extends State }, ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: '', isHaveRightWidget: true, rightWidget: getTFWidget( - false, TranslationLoader.lanKeys!.enterYourName!.tr, 2, logic, + false, '请输入姓名'.tr, 2, logic, maxSize: 50)), Container(height: 10.h), ], @@ -153,9 +153,9 @@ class _SendElectronicKeyViewState extends State // 生效失效时间 Widget keyTimeWidget(SendElectronicKeyViewLogic logic) { return Column( - children: [ + children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: logic.state.timeLimitBeginTime, isHaveLine: true, isHaveDirection: true, @@ -163,21 +163,21 @@ class _SendElectronicKeyViewState extends State final PDuration selectDate = PDuration.parse( DateTime.parse(logic.state.timeLimitBeginTime)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { logic.state.timeLimitBeginTime = DateTool().getYMDHNDateString(p, 1); logic.update(); }); }), CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: logic.state.timeLimitEndTime, isHaveDirection: true, action: () { final PDuration selectDate = PDuration.parse( DateTime.tryParse(logic.state.timeLimitEndTime)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { logic.state.timeLimitEndTime = DateTool().getYMDHNDateString(p, 1); logic.update(); @@ -191,9 +191,9 @@ class _SendElectronicKeyViewState extends State // 实名认证 Widget keyRealNameWidget(SendElectronicKeyViewLogic logic) { return Column( - children: [ + children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr, + leftTitel: '实名认证'.tr, rightTitle: '', isTipsImg: true, isHaveLine: logic.state.isRequireAuth.value, @@ -229,16 +229,16 @@ class _SendElectronicKeyViewState extends State // 循环有效期 Widget keyPeriodValidityWidget(SendElectronicKeyViewLogic logic) { return Column( - children: [ + children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: '${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}', isHaveDirection: true, isHaveLine: true, action: () async { final result = - await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { + await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { 'validityValue': logic.state.weekdaysList, 'starDate': logic.state.cycleBeginTime, 'endDate': logic.state.cycleEndTime, @@ -291,7 +291,7 @@ class _SendElectronicKeyViewState extends State action: () async { final result = await Get.toNamed( Routers.seletKeyCyclicDatePage, - arguments: { + arguments: { 'validityValue': logic.state.weekdaysList, 'starDate': logic.state.cycleBeginTime, 'endDate': logic.state.cycleEndTime, @@ -314,11 +314,11 @@ class _SendElectronicKeyViewState extends State Widget keyBottomWidget( String sendElectronicKeyTips, SendElectronicKeyViewLogic logic) { return Column( - children: [ + children: [ Container( padding: EdgeInsets.all(20.w), child: Row( - children: [ + children: [ Expanded( child: Text( sendElectronicKeyTips, @@ -344,7 +344,7 @@ class _SendElectronicKeyViewState extends State padding: EdgeInsets.only(right: 30.w), child: Row( mainAxisAlignment: MainAxisAlignment.end, - children: [ + children: [ TextButton( onPressed: () { // 获取是否是演示模式 演示模式不获取接口 @@ -356,7 +356,7 @@ class _SendElectronicKeyViewState extends State } }, child: Text( - TranslationLoader.lanKeys!.sendGroupKey!.tr, + '群发钥匙'.tr, style: TextStyle(color: AppColors.mainColor, fontSize: 22.sp), )), @@ -376,7 +376,7 @@ class _SendElectronicKeyViewState extends State width: 1.sw, color: Colors.white, child: Column( - children: [ + children: [ SizedBox( height: 30.h, ), @@ -390,7 +390,7 @@ class _SendElectronicKeyViewState extends State ), Row( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Text( '发送成功'.tr, style: TextStyle( @@ -462,7 +462,7 @@ class _SendElectronicKeyViewState extends State height: 65.h, width: 320.w, child: Row( - children: [ + children: [ Expanded( child: TextField( controller: logic.getCurrentController(lineIndex), @@ -546,7 +546,7 @@ class _SendElectronicKeyViewState extends State child: Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, + leftTitel: '允许远程开锁'.tr, rightTitle: '', isHaveRightWidget: true, rightWidget: SizedBox( @@ -568,7 +568,7 @@ class _SendElectronicKeyViewState extends State value: isRemote ? logic.state.isRemoteUnlock.value : logic.state.isAuthentication.value, - onChanged: (value) { + onChanged: (bool value) { if (isRemote) { logic.state.isRemoteUnlock.value = !logic.state.isRemoteUnlock.value; } else { @@ -646,7 +646,7 @@ class _SendElectronicKeyViewState extends State } List initBottomSheetList() { - final List widgetList = []; + final List widgetList = []; widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友'.tr, 0)); widgetList.add(buildCenter3('images/icon_message.png', '短信'.tr, 1)); widgetList.add(buildCenter3('images/icon_email.png', '邮件'.tr, 2)); @@ -664,7 +664,7 @@ class _SendElectronicKeyViewState extends State EdgeInsets.only(top: 20.w, bottom: 20.w, left: 10.w, right: 10.w), child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Image.asset( imageName, width: 50.w, diff --git a/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart b/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart index 9ec37cf0..3522e66d 100755 --- a/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart +++ b/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart @@ -79,8 +79,8 @@ class _AddFaceTypePageState extends State with SingleTickerProv child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyBottomWidget() ], @@ -94,8 +94,8 @@ class _AddFaceTypePageState extends State with SingleTickerProv child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyTimeLimitWidget(), keyBottomWidget() @@ -110,8 +110,8 @@ class _AddFaceTypePageState extends State with SingleTickerProv child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyCyclicDate(), SizedBox(height: 10.h), @@ -146,7 +146,7 @@ class _AddFaceTypePageState extends State with SingleTickerProv return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.timeLimitBeginTime.value, isHaveLine: true, isHaveDirection: true, @@ -160,7 +160,7 @@ class _AddFaceTypePageState extends State with SingleTickerProv }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.timeLimitEndTime.value, isHaveDirection: true, action: () { @@ -182,7 +182,7 @@ class _AddFaceTypePageState extends State with SingleTickerProv return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: '${state.cycleBeginTime.value}\n${state.cycleEndTime.value}', isHaveDirection: true, @@ -355,15 +355,14 @@ class _AddFaceTypePageState extends State with SingleTickerProv } final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'), - ItemView( - title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), + ItemView(title: '循环'.tr, selectType: '2'), ]; final List _fromCheckInTypeItemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), ]; TabBar _tabBar() { diff --git a/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart b/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart index 90d0ff6f..156955f6 100755 --- a/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart +++ b/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart @@ -45,13 +45,11 @@ class _FaceDetailPageState extends State with RouteAware { rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => lockDataListItem( - TranslationLoader.lanKeys!.name!.tr, state.typeName.value, - () { + Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () { // showCupertinoAlertDialog(context); ShowTipView().showTFViewAlertDialog( state.changeNameController, - '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}', + '修改姓名'.tr, '', () { if (state.changeNameController.text.isEmpty) { logic.showToast('请输入姓名'.tr); @@ -69,7 +67,7 @@ class _FaceDetailPageState extends State with RouteAware { state.keyType.value == 2 || state.keyType.value == 1, child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, allHeight: 70.h, // rightTitle:"2023.09.19 11:27\n2023.09.25 11:27", rightTitle: logic.getKeyTypeShowDateTime(), @@ -160,11 +158,11 @@ class _FaceDetailPageState extends State with RouteAware { })))), Container(height: 10.h), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.additive!.tr, + leftTitel: '添加者'.tr, rightTitle: state.adder.value, )), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.addTime!.tr, + leftTitel: '添加时间'.tr, rightTitle: DateTool() .dateToYMDHNString(state.addTime.value.toString()), )), @@ -200,7 +198,7 @@ class _FaceDetailPageState extends State with RouteAware { // addControlsBtn(type), SizedBox(height: 30.h), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, margin: EdgeInsets.only( diff --git a/lib/main/lockDetail/face/faceList/faceList_page.dart b/lib/main/lockDetail/face/faceList/faceList_page.dart index bdaeb54a..d1ad4ebf 100755 --- a/lib/main/lockDetail/face/faceList/faceList_page.dart +++ b/lib/main/lockDetail/face/faceList/faceList_page.dart @@ -61,7 +61,7 @@ class _FaceListPageState extends State with RouteAware { actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { diff --git a/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart b/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart index 43940779..8317abaa 100755 --- a/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart +++ b/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart @@ -77,8 +77,8 @@ class _AddFingerprintTypePageState extends State with Si child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyBottomWidget() ], @@ -92,8 +92,8 @@ class _AddFingerprintTypePageState extends State with Si child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyTimeLimitWidget(), keyBottomWidget() @@ -108,8 +108,8 @@ class _AddFingerprintTypePageState extends State with Si child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyCyclicDate(), SizedBox(height: 10.h), @@ -143,7 +143,7 @@ class _AddFingerprintTypePageState extends State with Si return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.timeLimitBeginTime.value, isHaveLine: true, isHaveDirection: true, @@ -156,7 +156,7 @@ class _AddFingerprintTypePageState extends State with Si }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.timeLimitEndTime.value, isHaveDirection: true, action: () { @@ -177,7 +177,7 @@ class _AddFingerprintTypePageState extends State with Si return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle:'${state.cycleBeginTime.value}\n${state.cycleEndTime.value}', isHaveDirection: true, isHaveLine: true, @@ -440,14 +440,14 @@ class _AddFingerprintTypePageState extends State with Si } final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), + ItemView(title: '循环'.tr, selectType: '2'), ]; final List _fromCheckInTypeItemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), ]; TabBar _tabBar() { diff --git a/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart b/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart index 4d947886..735ac175 100755 --- a/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart +++ b/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart @@ -46,12 +46,10 @@ class _FingerprintDetailPageState extends State rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => lockDataListItem( - TranslationLoader.lanKeys!.name!.tr, state.typeName.value, - () { + Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () { ShowTipView().showTFViewAlertDialog( state.changeNameController, - '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}', + '修改姓名'.tr, '', () { if (state.changeNameController.text.isEmpty) { logic.showToast('请输入姓名'.tr); @@ -70,7 +68,7 @@ class _FingerprintDetailPageState extends State state.keyType.value == 2 || state.keyType.value == 1, child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, allHeight: 70.h, // rightTitle:"2023.09.19 11:27\n2023.09.25 11:27", rightTitle: logic.getKeyTypeShowDateTime(), @@ -165,12 +163,12 @@ class _FingerprintDetailPageState extends State })))), Container(height: 10.h), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.additive!.tr, + leftTitel: '添加者'.tr, rightTitle: state.adder.value, isHaveLine: true, action: () {})), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.addTime!.tr, + leftTitel: '添加时间'.tr, rightTitle: DateTool() .dateToYMDHNString(state.addTime.value.toString()), )), @@ -210,7 +208,7 @@ class _FingerprintDetailPageState extends State // addControlsBtn(type), SizedBox(height: 30.h), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, margin: EdgeInsets.only( diff --git a/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart b/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart index d162a20f..9e902e4b 100755 --- a/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart +++ b/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart @@ -64,7 +64,7 @@ class _FingerprintListPageState extends State actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { diff --git a/lib/main/lockDetail/iris/addIris/addIris_page.dart b/lib/main/lockDetail/iris/addIris/addIris_page.dart index 21709faa..6dce7aae 100755 --- a/lib/main/lockDetail/iris/addIris/addIris_page.dart +++ b/lib/main/lockDetail/iris/addIris/addIris_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/iris/addIris/addIris_logic.dart'; +import 'package:star_lock/main/lockDetail/iris/addIris/addIris_state.dart'; import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/submitBtn.dart'; @@ -16,19 +17,19 @@ class AddIrisPage extends StatefulWidget { } class _AddIrisPageState extends State { - final logic = Get.put(AddIrisLogic()); - final state = Get.find().state; + final AddIrisLogic logic = Get.put(AddIrisLogic()); + final AddIrisState state = Get.find().state; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: TitleAppBar( - barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}", + barTitle: "${'添加'.tr}${'虹膜'.tr}", haveBack: true, backgroundColor: AppColors.mainColor), body: ListView( - children: [ + children: [ SizedBox( height: 50.h, ), @@ -47,10 +48,10 @@ class _AddIrisPageState extends State { padding: EdgeInsets.only(left: 20.w, right: 20.w), child: Row( mainAxisAlignment: MainAxisAlignment.start, - children: [ + children: [ Expanded( child: Text( - "请单人正对门锁,距离一个成年人手臂长度\n(约0.6米)。\n保持脸部无遮挡,露出五官。", + '请单人正对门锁,距离一个成年人手臂长度\n(约0.6米)。\n保持脸部无遮挡,露出五官。', textAlign: TextAlign.left, maxLines: null, style: @@ -68,7 +69,7 @@ class _AddIrisPageState extends State { ? Container( padding: EdgeInsets.only(left: 20.w, right: 20.w), child: SubmitBtn( - btnName: "准备好了,开始添加", + btnName: '准备好了,开始添加', borderRadius: 20.w, onClick: () { state.isClickAddFace.value = true; @@ -76,7 +77,7 @@ class _AddIrisPageState extends State { ) : Row( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Text( '正在录入中...', style: TextStyle( diff --git a/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart b/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart index d31196e9..5805c261 100755 --- a/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart +++ b/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_page.dart @@ -14,25 +14,25 @@ class AddIrisTypeManagePage extends StatefulWidget { } class _AddIrisTypeManagePageState extends State { - var index = 0; + int index = 0; @override Widget build(BuildContext context) { - Map map = Get.arguments; - var lockId = map["lockId"]; - var fromType = map["fromType"]; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 - var fromTypeTwoStaffName = ""; + final Map map = Get.arguments; + final lockId = map['lockId']; + final fromType = map['fromType']; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 + String fromTypeTwoStaffName = ''; if (fromType == 2) { - fromTypeTwoStaffName = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字 + fromTypeTwoStaffName = map['fromTypeTwoStaffName']; // 从添加员工进入 传入员工名字 } return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}", + barTitle: "${"添加".tr}${'虹膜'.tr}", haveBack: true, backgroundColor: AppColors.mainColor), body: Column( - children: [ + children: [ AddIrisTypeManageTabbar( lockId: lockId, fromType: fromType, diff --git a/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_tabbar.dart b/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_tabbar.dart index d57ed65c..d8200b5e 100755 --- a/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_tabbar.dart +++ b/lib/main/lockDetail/iris/addIrisType/addIrisTypeManage/addIrisTypeManage_tabbar.dart @@ -7,18 +7,14 @@ import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/CustomUnderlineTabIndicator.dart'; import '../../../../../translations/trans_lib.dart'; -class AddIrisTypeManageTabbar extends StatefulWidget { - var initialIndex = 1; - var lockId = 0; - var fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 - var fromTypeTwoStaffName = ""; // 从添加员工进入 传入员工名字 +class AddIrisTypeManageTabbar extends StatefulWidget { // 从添加员工进入 传入员工名字 AddIrisTypeManageTabbar( - {Key? key, - required this.lockId, - required this.fromType, - required this.fromTypeTwoStaffName, - required this.initialIndex}) + {required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, required this.initialIndex, Key? key}) : super(key: key); + int initialIndex = 1; + int lockId = 0; + int fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 + String fromTypeTwoStaffName = ''; @override State createState() => @@ -30,20 +26,18 @@ class _AddIrisTypeManageTabbarState extends State late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), - ItemView( - title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), + ItemView(title: '循环'.tr, selectType: '2'), ]; final List _fromCheckInTypeItemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), ]; @override void initState() { - // TODO: implement initState super.initState(); _tabController = TabController( vsync: this, @@ -61,7 +55,7 @@ class _AddIrisTypeManageTabbarState extends State Widget build(BuildContext context) { return Expanded( child: Column( - children: [ + children: [ _tabBar(), _pageWidget(), ], @@ -72,9 +66,9 @@ class _AddIrisTypeManageTabbarState extends State return TabBar( controller: _tabController, tabs: widget.fromType == 1 - ? _itemTabs.map((ItemView item) => _tab(item)).toList() + ? _itemTabs.map(_tab).toList() : _fromCheckInTypeItemTabs - .map((ItemView item) => _tab(item)) + .map(_tab) .toList(), isScrollable: true, indicatorColor: Colors.red, diff --git a/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart b/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart index 5dfabc2d..e17320f3 100755 --- a/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart +++ b/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart @@ -4,6 +4,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/iris/addIrisType/addIrisType_logic.dart'; +import 'package:star_lock/main/lockDetail/iris/addIrisType/addIrisType_state.dart'; import 'package:star_lock/tools/commonDataManage.dart'; import 'package:star_lock/tools/dateTool.dart'; import 'package:star_lock/tools/pickers/pickers.dart'; @@ -17,27 +18,22 @@ import '../../../../tools/storage.dart'; import '../../../../tools/submitBtn.dart'; import '../../../../translations/trans_lib.dart'; -class AddIrisTypePage extends StatefulWidget { +class AddIrisTypePage extends StatefulWidget { // 从添加员工进入 传入员工名字 + const AddIrisTypePage( + {required this.selectType, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, Key? key}) + : super(key: key); final String selectType; // 永久限时循环下标 final int lockId; final int fromType; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入 - final String fromTypeTwoStaffName; // 从添加员工进入 传入员工名字 - - const AddIrisTypePage( - {Key? key, - required this.selectType, - required this.lockId, - required this.fromType, - required this.fromTypeTwoStaffName}) - : super(key: key); + final String fromTypeTwoStaffName; @override State createState() => _AddIrisTypePageState(); } class _AddIrisTypePageState extends State { - final logic = Get.put(AddIrisTypeLogic()); - final state = Get.find().state; + final AddIrisTypeLogic logic = Get.put(AddIrisTypeLogic()); + final AddIrisTypeState state = Get.find().state; @override Widget build(BuildContext context) { @@ -53,7 +49,6 @@ class _AddIrisTypePageState extends State { @override void initState() { - // TODO: implement initState super.initState(); WidgetsBinding.instance.addPostFrameCallback((_) { @@ -75,10 +70,10 @@ class _AddIrisTypePageState extends State { { // 永久 return Column( - children: [ + children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyBottomWidget() ], @@ -88,10 +83,10 @@ class _AddIrisTypePageState extends State { { // 限时 return Column( - children: [ + children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyTimeLimitWidget(), keyBottomWidget() @@ -102,10 +97,10 @@ class _AddIrisTypePageState extends State { { // 循环 return Column( - children: [ + children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyCyclicDate(), SizedBox(height: 10.h), @@ -122,7 +117,7 @@ class _AddIrisTypePageState extends State { Widget perpetualKeyWidget( String titleStr, String rightTitle, TextEditingController controller) { return Column( - children: [ + children: [ Container(height: 10.h), CommonItem( leftTitel: titleStr, @@ -137,29 +132,29 @@ class _AddIrisTypePageState extends State { // 限时顶部选择日期 Widget keyTimeLimitWidget() { return Column( - children: [ + children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, action: () async { - PDuration selectDate = + final PDuration selectDate = PDuration.parse(DateTime.tryParse(state.beginTime.value)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { state.beginTime.value = DateTool().getYMDHNDateString(p, 1); }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { - PDuration selectDate = + final PDuration selectDate = PDuration.parse(DateTime.tryParse(state.endTime.value)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { state.endTime.value = DateTool().getYMDHNDateString(p, 1); }); })), @@ -171,15 +166,15 @@ class _AddIrisTypePageState extends State { // 循环顶部选择日期 Widget keyCyclicDate() { return Column( - children: [ + children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: '${state.beginTime.value}\n${state.endTime.value}', isHaveDirection: true, isHaveLine: true, action: () async { - var result = - await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { + final result = + await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { 'validityValue': state.weekdaysList.value, 'starDate': state.beginTime.value, 'endDate': state.endTime.value, @@ -195,15 +190,15 @@ class _AddIrisTypePageState extends State { } })), Obx(() => Visibility( - visible: state.weekdaysList.isNotEmpty ? true : false, + visible: state.weekdaysList.isNotEmpty, child: CommonItem( leftTitel: '有效日'.tr, rightTitle: logic.weekDayStr.join(',').toString(), isHaveDirection: true, isHaveLine: true, action: () async { - var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, - arguments: { + final result = await Get.toNamed(Routers.seletKeyCyclicDatePage, + arguments: { 'validityValue': state.weekdaysList.value, 'starDate': state.beginTime.value, 'endDate': state.endTime.value, @@ -226,8 +221,8 @@ class _AddIrisTypePageState extends State { '${state.effectiveDateTime.value}-${state.failureDateTime.value}', isHaveDirection: true, action: () async { - var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, - arguments: { + final result = await Get.toNamed(Routers.seletKeyCyclicDatePage, + arguments: { 'validityValue': state.weekdaysList.value, 'starDate': state.beginTime.value, 'endDate': state.endTime.value, @@ -249,11 +244,9 @@ class _AddIrisTypePageState extends State { Widget keyBottomWidget() { return Column( - children: [ + children: [ Obx(() => Visibility( - visible: CommonDataManage().currentKeyInfo.isLockOwner == 1 - ? true - : false, + visible: CommonDataManage().currentKeyInfo.isLockOwner == 1, child: CommonItem( leftTitel: '是否为管理员'.tr, rightTitle: '', @@ -265,7 +258,7 @@ class _AddIrisTypePageState extends State { SubmitBtn( btnName: TranslationLoader.lanKeys!.next!.tr, onClick: () async { - var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); + final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { if (state.nameController.text.isEmpty) { logic.showToast('请输入姓名'); @@ -291,7 +284,7 @@ class _AddIrisTypePageState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Expanded( child: TextField( //输入框一行 @@ -341,7 +334,7 @@ class _AddIrisTypePageState extends State { trackColor: CupertinoColors.systemGrey5, thumbColor: CupertinoColors.white, value: state.isAdministrator.value, - onChanged: (value) { + onChanged: (bool value) { state.isAdministrator.value = value; }, ); diff --git a/lib/main/lockDetail/iris/irisDetail/irisDetail_page.dart b/lib/main/lockDetail/iris/irisDetail/irisDetail_page.dart index 4e9c9618..96c518cd 100755 --- a/lib/main/lockDetail/iris/irisDetail/irisDetail_page.dart +++ b/lib/main/lockDetail/iris/irisDetail/irisDetail_page.dart @@ -48,7 +48,7 @@ class _CardDetailPageState extends State with RouteAware { isHaveDirection: false, isHaveLine: true)), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: state.typeName.value, isHaveDirection: true, isHaveLine: true, @@ -56,13 +56,11 @@ class _CardDetailPageState extends State with RouteAware { showCupertinoAlertDialog(context); })), Obx(() => Visibility( - visible: (state.keyType.value == 4 || + visible: state.keyType.value == 4 || state.keyType.value == 2 || - state.keyType.value == 1) - ? true - : false, + state.keyType.value == 1, child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, allHeight: 70.h, // rightTitle:"2023.09.19 11:27\n2023.09.25 11:27", rightTitle: logic.getKeyTypeShowDateTime(), @@ -106,7 +104,7 @@ class _CardDetailPageState extends State with RouteAware { } }))), Obx(() => Visibility( - visible: state.keyType.value == 4 ? true : false, + visible: state.keyType.value == 4, child: Obx(() => CommonItem( leftTitel: TranslationLoader.lanKeys!.effectiveDay!.tr, rightTitle: logic.weekDayStr.join(','), @@ -157,11 +155,11 @@ class _CardDetailPageState extends State with RouteAware { })))), Container(height: 10.h), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.additive!.tr, + leftTitel: '添加者'.tr, rightTitle: state.adder.value, )), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.addTime!.tr, + leftTitel: '添加时间'.tr, rightTitle: DateTool() .dateToYMDHNString(state.addTime.value.toString()), )), @@ -188,7 +186,7 @@ class _CardDetailPageState extends State with RouteAware { // addControlsBtn(type), SizedBox(height: 30.h), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, margin: EdgeInsets.only( @@ -313,8 +311,7 @@ class _CardDetailPageState extends State with RouteAware { context: context, builder: (BuildContext context) { return ShowTFView( - title: - "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}", + title: '修改姓名'.tr, tipTitle: '', controller: state.changeNameController, sureClick: () { @@ -354,7 +351,6 @@ class _CardDetailPageState extends State with RouteAware { @override void didChangeDependencies() { - // TODO: implement didChangeDependencies super.didChangeDependencies(); /// 路由订阅 @@ -363,7 +359,6 @@ class _CardDetailPageState extends State with RouteAware { @override void dispose() { - // TODO: implement dispose /// 取消路由订阅 AppRouteObserver().routeObserver.unsubscribe(this); super.dispose(); @@ -381,7 +376,9 @@ class _CardDetailPageState extends State with RouteAware { void didPop() { super.didPop(); logic.cancelBlueConnetctToastTimer(); - if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); + if (EasyLoading.isShow) { + EasyLoading.dismiss(animation: true); + } state.ifCurrentScreen.value = false; state.sureBtnState.value = 0; } @@ -398,7 +395,9 @@ class _CardDetailPageState extends State with RouteAware { void didPushNext() { super.didPushNext(); logic.cancelBlueConnetctToastTimer(); - if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); + if (EasyLoading.isShow) { + EasyLoading.dismiss(animation: true); + } state.ifCurrentScreen.value = false; state.sureBtnState.value = 0; } diff --git a/lib/main/lockDetail/iris/irisList/irisList_page.dart b/lib/main/lockDetail/iris/irisList/irisList_page.dart index 1be0a00f..299ea3a7 100755 --- a/lib/main/lockDetail/iris/irisList/irisList_page.dart +++ b/lib/main/lockDetail/iris/irisList/irisList_page.dart @@ -39,7 +39,7 @@ class _IrisListPageState extends State { actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { @@ -268,7 +268,7 @@ class _IrisListPageState extends State { }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () { Navigator.pop(context); state.isDeletFaceData = true; diff --git a/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_page.dart b/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_page.dart index bb9cc01b..0051a7b4 100755 --- a/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_page.dart +++ b/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_page.dart @@ -96,7 +96,7 @@ class _AutomaticBlockingPageState extends State '15S', '30S', '60S', - TranslationLoader.lanKeys!.custom!.tr + '自定义'.tr ]; ShowBottomSheetTool().showSingleRowPicker( //上下文 @@ -106,7 +106,7 @@ class _AutomaticBlockingPageState extends State title: TranslationLoader.lanKeys!.time!.tr, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, - sureTitle: TranslationLoader.lanKeys!.sure!.tr, + sureTitle: '确定'.tr, //要显示的列表 data: list, //选择事件的回调 diff --git a/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart b/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart index bbf5d235..98d590d6 100755 --- a/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart @@ -78,7 +78,7 @@ class _BasicInformationPageState extends State { }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: logic.getUseKeyTypeStr( state.lockBasicInfo.value.startDate, state.lockBasicInfo.value.endDate, diff --git a/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_page.dart b/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_page.dart index 91bb7e2d..ac210b02 100755 --- a/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_page.dart +++ b/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_page.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_state.dart'; import '../../../../appRouters.dart'; import '../../../../app_settings/app_colors.dart'; @@ -21,64 +22,63 @@ class CheckInCreatCompanyPage extends StatefulWidget { } class _CheckInCreatCompanyPageState extends State { - final logic = Get.put(CheckInCreatCompanyLogic()); - final state = Get.find().state; + final CheckInCreatCompanyLogic logic = Get.put(CheckInCreatCompanyLogic()); + final CheckInCreatCompanyState state = Get.find().state; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: "创建公司", + barTitle: '创建公司', haveBack: true, backgroundColor: AppColors.mainColor), body: Column( - children: [ + children: [ CommonItem( - leftTitel: "${TranslationLoader.lanKeys!.company!.tr}${TranslationLoader.lanKeys!.name!.tr}", - rightTitle: "", + leftTitel: '公司名称'.tr, + rightTitle: '', isHaveLine: true, isHaveRightWidget: true, - rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.enterYourName!.tr, 2)), + rightWidget: getTFWidget(false, '请输入姓名'.tr, 2)), Obx(() => CommonItem( leftTitel: - "${TranslationLoader.lanKeys!.work!.tr}${TranslationLoader.lanKeys!.time!.tr}", - rightTitle: (state.beginTime.value.isNotEmpty) ? "${state.beginTime.value} - ${state.endTime.value}" : "", + '工作时间'.tr, + rightTitle: (state.beginTime.value.isNotEmpty) ? '${state.beginTime.value} - ${state.endTime.value}' : '', isHaveLine: true, isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: { + var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: { // "getKeyInfosData": state.lockSetInfoData.value, - "companyId": "1", - "pushType": "0", - "checkingInSetInfo": CheckingInSetInfo(), + 'companyId': '1', + 'pushType': '0', + 'checkingInSetInfo': CheckingInSetInfo(), }); if(data != null) { - state.beginTime.value = data["beginTime"]; - state.endTime.value = data["endTime"]; - state.beginTimeTimestamp.value = data["beginTimeTimestamp"]; - state.endTimeTimestamp.value = data["endTimeTimestamp"]; + state.beginTime.value = data['beginTime']; + state.endTime.value = data['endTime']; + state.beginTimeTimestamp.value = data['beginTimeTimestamp']; + state.endTimeTimestamp.value = data['endTimeTimestamp']; logic.ifCanNext(); } })), Obx(() => CommonItem( - leftTitel: - "${TranslationLoader.lanKeys!.workday!.tr}${TranslationLoader.lanKeys!.set!.tr}", + leftTitel: '工作日设置'.tr, rightTitle: state.weekDaysStr.value, isHaveLine: true, isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: { - "getKeyInfosData": state.lockSetInfoData.value, - "companyId": "0", - "pushType": "0", - "checkingInSetInfo": CheckingInSetInfo(), + var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: { + 'getKeyInfosData': state.lockSetInfoData.value, + 'companyId': '0', + 'pushType': '0', + 'checkingInSetInfo': CheckingInSetInfo(), }); if(data != null) { - state.isCustom.value = data["attendanceType"]; - state.weekDays.value = data["weekDays"]; - state.weekDaysStr.value = state.weekDays.value.join(","); + state.isCustom.value = data['attendanceType']; + state.weekDays.value = data['weekDays']; + state.weekDaysStr.value = state.weekDays.value.join(','); logic.ifCanNext(); } })), @@ -86,16 +86,14 @@ class _CheckInCreatCompanyPageState extends State { height: 30.h, ), Obx(() => SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, fontSize: 32.sp, isDelete: false, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), isDisabled: state.canNext.value, - onClick: state.canNext.value ? (){ - logic.setCheckInCreateCompany(); - }: null)), + onClick: state.canNext.value ? logic.setCheckInCreateCompany: null)), ], ), ); @@ -106,7 +104,7 @@ class _CheckInCreatCompanyPageState extends State { // height: 50.h, width: 320.w, child: Row( - children: [ + children: [ Expanded( child: TextField( controller:state.companyNameController, @@ -119,7 +117,7 @@ class _CheckInCreatCompanyPageState extends State { style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), autofocus: false, textAlign: TextAlign.end, - onChanged: (value) { + onChanged: (String value) { logic.ifCanNext(); }, decoration: InputDecoration( @@ -133,15 +131,6 @@ class _CheckInCreatCompanyPageState extends State { border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), contentPadding: const EdgeInsets.symmetric(vertical: 0), ), - - // decoration: InputDecoration( - // //输入里面输入文字内边距设置 - // contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), - // hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, - // hintStyle: TextStyle(fontSize: 22.sp), - // //不需要输入框下划线 - // border: InputBorder.none, - // ), ), ) ], diff --git a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart index b5405189..1006645d 100755 --- a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart +++ b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart @@ -39,7 +39,7 @@ class _ConfiguringWifiPageState extends State with RouteAwa Container(width: 1.sw, height: 1.h,color: AppColors.mainBackgroundColor), configuringWifiTFWidget(TranslationLoader.lanKeys!.wifiPassward!.tr, TranslationLoader.lanKeys!.pleaseEnterWifiPwd!.tr, state.wifiPWDController), SizedBox(height: 50.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () { + SubmitBtn(btnName: '确定'.tr, onClick: () { logic.senderConfiguringWifiAction(); }), ], diff --git a/lib/main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart b/lib/main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart index faead0db..124ffd23 100755 --- a/lib/main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart +++ b/lib/main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart @@ -56,7 +56,7 @@ class _ImportOtherLockDataPageState extends State { Container( margin: EdgeInsets.only(left: 20.w, right: 20.w), child: SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {}), + btnName: '确定'.tr, onClick: () {}), ), SizedBox( height: 40.h, @@ -82,7 +82,7 @@ class _ImportOtherLockDataPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only( top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, + hintText: '请输入'.tr, hintStyle: TextStyle(fontSize: 22.sp, height: 3.0), //不需要输入框下划线 border: InputBorder.none, diff --git a/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart b/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart index 76accdf2..dea517aa 100755 --- a/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart +++ b/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart @@ -161,7 +161,7 @@ class _LockSetPageState extends State Container( padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h), child: SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, onClick: () async { // logic.deletUserAction(); @@ -634,7 +634,7 @@ class _LockSetPageState extends State Container( padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h), child: SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, onClick: () { // logic.deletUserAction(); diff --git a/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart b/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart index f34d4cce..14a5bb06 100755 --- a/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart +++ b/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart @@ -76,7 +76,7 @@ class _MarkedHouseStatePageState extends State { height: 60.h, ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), diff --git a/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart b/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart index 3d4af8c7..2e923da7 100755 --- a/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart +++ b/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart @@ -40,7 +40,7 @@ class _NormallyOpenModePageState extends State children: [ CommonItem( leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr, - rightTitle: "", + rightTitle: '', isHaveLine: false, isHaveRightWidget: true, rightWidget: SizedBox( @@ -164,28 +164,28 @@ class _NormallyOpenModePageState extends State String dateStr; switch (index) { case 1: - dateStr = TranslationLoader.lanKeys!.mondayShort!.tr; + dateStr = '简写周一'.tr; break; case 2: - dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr; + dateStr = '简写周二'.tr; break; case 3: - dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr; + dateStr = '简写周三'.tr; break; case 4: - dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr; + dateStr = '简写周四'.tr; break; case 5: - dateStr = TranslationLoader.lanKeys!.fridayShort!.tr; + dateStr = '简写周五'.tr; break; case 6: - dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr; + dateStr = '简写周六'.tr; break; case 7: - dateStr = TranslationLoader.lanKeys!.sundayShort!.tr; + dateStr = '简写周日'.tr; break; default: - dateStr = ""; + dateStr = ''; break; } return GestureDetector( @@ -236,7 +236,7 @@ class _NormallyOpenModePageState extends State Obx(() => CommonItem( leftTitel: "${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.time!.tr}", - rightTitle: "", + rightTitle: '', isHaveLine: true, isHaveRightWidget: true, rightWidget: GestureDetector( @@ -296,7 +296,7 @@ class _NormallyOpenModePageState extends State setState(() { state.beginTimeMinute.value = p.hour! * 60 + p.minute!; - state.beginTime.value = "${p.hour}:${p.minute!}"; + state.beginTime.value = '${p.hour}:${p.minute!}'; }); }); })), @@ -317,7 +317,7 @@ class _NormallyOpenModePageState extends State setState(() { state.endTimeMinute.value = p.hour! * 60 + p.minute!; - state.endTime.value = "${p.hour}:${p.minute!}"; + state.endTime.value = '${p.hour}:${p.minute!}'; }); }); })), diff --git a/lib/main/lockDetail/lockSet/unlockQRCode/unlockQRCode_page.dart b/lib/main/lockDetail/lockSet/unlockQRCode/unlockQRCode_page.dart index c089ce5a..c39faa38 100755 --- a/lib/main/lockDetail/lockSet/unlockQRCode/unlockQRCode_page.dart +++ b/lib/main/lockDetail/lockSet/unlockQRCode/unlockQRCode_page.dart @@ -60,7 +60,7 @@ class _UnlockQRCodePageState extends State { Container( margin: EdgeInsets.only(left: 20.w, right: 20.w), child: SubmitBtn( - btnName: TranslationLoader.lanKeys!.share!.tr, + btnName: '分享'.tr, onClick: () {}), ), SizedBox( diff --git a/lib/main/lockDetail/lockSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart b/lib/main/lockDetail/lockSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart index c833785f..befe0901 100755 --- a/lib/main/lockDetail/lockSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart +++ b/lib/main/lockDetail/lockSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart @@ -32,7 +32,7 @@ class _WirelessKeyboardPageState extends State { actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { @@ -157,7 +157,7 @@ class _WirelessKeyboardPageState extends State { }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.reset!.tr), + child: Text('重置'.tr), onPressed: () { Navigator.of(context).pop(); }, diff --git a/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart b/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart index 77b0425b..b458cc18 100755 --- a/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart +++ b/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart @@ -180,8 +180,7 @@ class _AddFamilyPageState extends State { context: context, builder: (BuildContext context) { return ShowTFView( - title: - '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}', + title: '修改名字'.tr, tipTitle: '请输入'.tr, controller: state.changeNameController, inputFormatters: [ diff --git a/lib/main/lockDetail/messageWarn/notificationMode/notificationMode_page.dart b/lib/main/lockDetail/messageWarn/notificationMode/notificationMode_page.dart index 2570952a..aa696fa5 100755 --- a/lib/main/lockDetail/messageWarn/notificationMode/notificationMode_page.dart +++ b/lib/main/lockDetail/messageWarn/notificationMode/notificationMode_page.dart @@ -1,3 +1,4 @@ + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -7,7 +8,6 @@ import 'package:star_lock/main/lockDetail/messageWarn/notificationMode/notificat import 'package:star_lock/main/lockDetail/messageWarn/notificationMode/notificationMode_logic.dart'; import 'package:star_lock/main/lockDetail/messageWarn/notificationMode/notificationMode_state.dart'; import 'package:star_lock/tools/commonItem.dart'; -import 'package:star_lock/tools/regularExpression.dart'; import 'package:star_lock/tools/submitBtn.dart'; import 'package:star_lock/translations/trans_lib.dart'; @@ -161,7 +161,7 @@ class _NotificationModePageState extends State { width: 20.w, ), Text( - TranslationLoader.lanKeys!.receiver!.tr, + '接收者'.tr, style: TextStyle(fontSize: 22.sp), ), Expanded(child: SizedBox(width: 10.w)), diff --git a/lib/main/lockDetail/palm/addPalm/addPalm_page.dart b/lib/main/lockDetail/palm/addPalm/addPalm_page.dart index c29345da..bb6b8deb 100755 --- a/lib/main/lockDetail/palm/addPalm/addPalm_page.dart +++ b/lib/main/lockDetail/palm/addPalm/addPalm_page.dart @@ -2,11 +2,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/palm/addPalm/addPalm_logic.dart'; +import 'package:star_lock/main/lockDetail/palm/addPalm/addPalm_state.dart'; import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/submitBtn.dart'; import '../../../../../tools/titleAppBar.dart'; -import '../../../../../translations/trans_lib.dart'; class AddPalmPage extends StatefulWidget { const AddPalmPage({Key? key}) : super(key: key); @@ -16,19 +16,19 @@ class AddPalmPage extends StatefulWidget { } class _AddPalmPageState extends State { - final logic = Get.put(AddPalmLogic()); - final state = Get.find().state; + final AddPalmLogic logic = Get.put(AddPalmLogic()); + final AddPalmState state = Get.find().state; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: TitleAppBar( - barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}手掌", + barTitle: '添加手掌', haveBack: true, backgroundColor: AppColors.mainColor), body: ListView( - children: [ + children: [ SizedBox( height: 50.h, ), @@ -47,10 +47,10 @@ class _AddPalmPageState extends State { padding: EdgeInsets.only(left: 20.w, right: 20.w), child: Row( mainAxisAlignment: MainAxisAlignment.start, - children: [ + children: [ Expanded( child: Text( - "请自然张开手掌,掌心正对摄像头,距离约一个成年\n人手掌宽度(约10厘米)。", + '请自然张开手掌,掌心正对摄像头,距离约一个成年\n人手掌宽度(约10厘米)。', textAlign: TextAlign.left, maxLines: null, style: @@ -68,7 +68,7 @@ class _AddPalmPageState extends State { ? Container( padding: EdgeInsets.only(left: 20.w, right: 20.w), child: SubmitBtn( - btnName: "准备好了,开始添加", + btnName: '准备好了,开始添加', borderRadius: 20.w, onClick: () { state.isClickAddFace.value = true; @@ -76,7 +76,7 @@ class _AddPalmPageState extends State { ) : Row( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Text( '正在录入中...', style: TextStyle( diff --git a/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_page.dart b/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_page.dart index 9ae42ad6..bbd9ac87 100755 --- a/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_page.dart +++ b/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_page.dart @@ -14,25 +14,25 @@ class AddPalmTypeManagePage extends StatefulWidget { } class _AddPalmTypeManagePageState extends State { - var index = 0; + int index = 0; @override Widget build(BuildContext context) { - Map map = Get.arguments; - var lockId = map["lockId"]; - var fromType = map["fromType"]; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 - var fromTypeTwoStaffName = ""; + final Map map = Get.arguments; + final lockId = map['lockId']; + final fromType = map['fromType']; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 + String fromTypeTwoStaffName = ''; if (fromType == 2) { - fromTypeTwoStaffName = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字 + fromTypeTwoStaffName = map['fromTypeTwoStaffName']; // 从添加员工进入 传入员工名字 } return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}手掌", + barTitle: '添加手掌', haveBack: true, backgroundColor: AppColors.mainColor), body: Column( - children: [ + children: [ AddPalmTypeManageTabbar( lockId: lockId, fromType: fromType, diff --git a/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_tabbar.dart b/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_tabbar.dart index 0e8c268a..3075262e 100755 --- a/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_tabbar.dart +++ b/lib/main/lockDetail/palm/addPalmType/addPalmTypeManage/addPalmTypeManage_tabbar.dart @@ -7,18 +7,14 @@ import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/CustomUnderlineTabIndicator.dart'; import '../../../../../translations/trans_lib.dart'; -class AddPalmTypeManageTabbar extends StatefulWidget { - var initialIndex = 1; - var lockId = 0; - var fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 - var fromTypeTwoStaffName = ""; // 从添加员工进入 传入员工名字 +class AddPalmTypeManageTabbar extends StatefulWidget { // 从添加员工进入 传入员工名字 AddPalmTypeManageTabbar( - {Key? key, - required this.lockId, - required this.fromType, - required this.fromTypeTwoStaffName, - required this.initialIndex}) + {required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, required this.initialIndex, Key? key}) : super(key: key); + int initialIndex = 1; + int lockId = 0; + int fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 + String fromTypeTwoStaffName = ''; @override State createState() => @@ -30,20 +26,18 @@ class _AddPalmTypeManageTabbarState extends State late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), - ItemView( - title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), + ItemView(title: '循环'.tr, selectType: '2'), ]; final List _fromCheckInTypeItemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), ]; @override void initState() { - // TODO: implement initState super.initState(); _tabController = TabController( vsync: this, @@ -61,7 +55,7 @@ class _AddPalmTypeManageTabbarState extends State Widget build(BuildContext context) { return Expanded( child: Column( - children: [ + children: [ _tabBar(), _pageWidget(), ], @@ -72,9 +66,9 @@ class _AddPalmTypeManageTabbarState extends State return TabBar( controller: _tabController, tabs: widget.fromType == 1 - ? _itemTabs.map((ItemView item) => _tab(item)).toList() + ? _itemTabs.map(_tab).toList() : _fromCheckInTypeItemTabs - .map((ItemView item) => _tab(item)) + .map(_tab) .toList(), isScrollable: true, indicatorColor: Colors.red, diff --git a/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart b/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart index 2a66c706..e2cbb75e 100755 --- a/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart +++ b/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart @@ -4,6 +4,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/palm/addPalmType/addPalmType_logic.dart'; +import 'package:star_lock/main/lockDetail/palm/addPalmType/addPalmType_state.dart'; import 'package:star_lock/tools/commonDataManage.dart'; import 'package:star_lock/tools/dateTool.dart'; import 'package:star_lock/tools/pickers/pickers.dart'; @@ -17,27 +18,23 @@ import '../../../../tools/storage.dart'; import '../../../../tools/submitBtn.dart'; import '../../../../translations/trans_lib.dart'; -class AddPalmTypePage extends StatefulWidget { +class AddPalmTypePage extends StatefulWidget { // 从添加员工进入 传入员工名字 + + const AddPalmTypePage( + {required this.selectType, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, Key? key}) + : super(key: key); final String selectType; // 永久限时循环下标 final int lockId; final int fromType; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入 - final String fromTypeTwoStaffName; // 从添加员工进入 传入员工名字 - - const AddPalmTypePage( - {Key? key, - required this.selectType, - required this.lockId, - required this.fromType, - required this.fromTypeTwoStaffName}) - : super(key: key); + final String fromTypeTwoStaffName; @override State createState() => _AddPalmTypePageState(); } class _AddPalmTypePageState extends State { - final logic = Get.put(AddPalmTypeLogic()); - final state = Get.find().state; + final AddPalmTypeLogic logic = Get.put(AddPalmTypeLogic()); + final AddPalmTypeState state = Get.find().state; @override Widget build(BuildContext context) { @@ -75,10 +72,10 @@ class _AddPalmTypePageState extends State { { // 永久 return Column( - children: [ + children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyBottomWidget() ], @@ -88,10 +85,10 @@ class _AddPalmTypePageState extends State { { // 限时 return Column( - children: [ + children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyTimeLimitWidget(), keyBottomWidget() @@ -102,10 +99,10 @@ class _AddPalmTypePageState extends State { { // 循环 return Column( - children: [ + children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyCyclicDate(), SizedBox(height: 10.h), @@ -122,7 +119,7 @@ class _AddPalmTypePageState extends State { Widget perpetualKeyWidget( String titleStr, String rightTitle, TextEditingController controller) { return Column( - children: [ + children: [ Container(height: 10.h), CommonItem( leftTitel: titleStr, @@ -137,29 +134,29 @@ class _AddPalmTypePageState extends State { // 限时顶部选择日期 Widget keyTimeLimitWidget() { return Column( - children: [ + children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, action: () async { - PDuration selectDate = + final PDuration selectDate = PDuration.parse(DateTime.tryParse(state.beginTime.value)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { state.beginTime.value = DateTool().getYMDHNDateString(p, 1); }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { - PDuration selectDate = + final PDuration selectDate = PDuration.parse(DateTime.tryParse(state.endTime.value)); Pickers.showDatePicker(context, - selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) { + selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) { state.endTime.value = DateTool().getYMDHNDateString(p, 1); }); })), @@ -171,15 +168,15 @@ class _AddPalmTypePageState extends State { // 循环顶部选择日期 Widget keyCyclicDate() { return Column( - children: [ + children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: '${state.beginTime.value}\n${state.endTime.value}', isHaveDirection: true, isHaveLine: true, action: () async { - var result = - await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { + final result = + await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { 'validityValue': state.weekdaysList.value, 'starDate': state.beginTime.value, 'endDate': state.endTime.value, @@ -202,8 +199,8 @@ class _AddPalmTypePageState extends State { isHaveDirection: true, isHaveLine: true, action: () async { - var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, - arguments: { + final result = await Get.toNamed(Routers.seletKeyCyclicDatePage, + arguments: { 'validityValue': state.weekdaysList.value, 'starDate': state.beginTime.value, 'endDate': state.endTime.value, @@ -226,8 +223,8 @@ class _AddPalmTypePageState extends State { '${state.effectiveDateTime.value}-${state.failureDateTime.value}', isHaveDirection: true, action: () async { - var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, - arguments: { + final result = await Get.toNamed(Routers.seletKeyCyclicDatePage, + arguments: { 'validityValue': state.weekdaysList.value, 'starDate': state.beginTime.value, 'endDate': state.endTime.value, @@ -249,11 +246,9 @@ class _AddPalmTypePageState extends State { Widget keyBottomWidget() { return Column( - children: [ + children: [ Obx(() => Visibility( - visible: CommonDataManage().currentKeyInfo.isLockOwner == 1 - ? true - : false, + visible: CommonDataManage().currentKeyInfo.isLockOwner == 1, child: CommonItem( leftTitel: '是否为管理员'.tr, rightTitle: '', @@ -265,7 +260,7 @@ class _AddPalmTypePageState extends State { SubmitBtn( btnName: TranslationLoader.lanKeys!.next!.tr, onClick: () async { - var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); + final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { if (state.nameController.text.isEmpty) { logic.showToast('请输入姓名'); @@ -291,7 +286,7 @@ class _AddPalmTypePageState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Expanded( child: TextField( //输入框一行 @@ -341,7 +336,7 @@ class _AddPalmTypePageState extends State { trackColor: CupertinoColors.systemGrey5, thumbColor: CupertinoColors.white, value: state.isAdministrator.value, - onChanged: (value) { + onChanged: (bool value) { state.isAdministrator.value = value; }, ); diff --git a/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart b/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart index a36a8394..086a4e39 100755 --- a/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart +++ b/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart @@ -1,19 +1,19 @@ import 'package:flutter/cupertino.dart'; + import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/iris/irisDetail/irisDetail_logic.dart'; +import 'package:star_lock/main/lockDetail/iris/irisDetail/irisDetail_state.dart'; import '../../../../appRouters.dart'; import '../../../../app_settings/app_colors.dart'; -import '../../../../blue/blue_manage.dart'; import '../../../../tools/appRouteObserver.dart'; import '../../../../tools/commonItem.dart'; import '../../../../tools/dateTool.dart'; import '../../../../tools/showIosTipView.dart'; import '../../../../tools/showTFView.dart'; -import '../../../../tools/storage.dart'; import '../../../../tools/submitBtn.dart'; import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; @@ -26,8 +26,8 @@ class PalmDetailPage extends StatefulWidget { } class _PalmDetailPageState extends State with RouteAware { - final logic = Get.put(IrisDetailLogic()); - final state = Get.find().state; + final IrisDetailLogic logic = Get.put(IrisDetailLogic()); + final IrisDetailState state = Get.find().state; @override Widget build(BuildContext context) { @@ -39,14 +39,14 @@ class _PalmDetailPageState extends State with RouteAware { backgroundColor: AppColors.mainColor, ), body: ListView( - children: [ + children: [ Obx(() => CommonItem( leftTitel: '手掌号', rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: state.typeName.value, isHaveDirection: true, isHaveLine: true, @@ -54,13 +54,11 @@ class _PalmDetailPageState extends State with RouteAware { showCupertinoAlertDialog(context); })), Obx(() => Visibility( - visible: (state.keyType.value == 4 || + visible: state.keyType.value == 4 || state.keyType.value == 2 || - state.keyType.value == 1) - ? true - : false, + state.keyType.value == 1, child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, allHeight: 70.h, // rightTitle:"2023.09.19 11:27\n2023.09.25 11:27", rightTitle: logic.getKeyTypeShowDateTime(), @@ -69,9 +67,9 @@ class _PalmDetailPageState extends State with RouteAware { action: () async { if (state.keyType.value == 2 || state.keyType.value == 1) { // 限时 - var data = await Get.toNamed( + final data = await Get.toNamed( Routers.otherTypeKeyChangeDatePage, - arguments: { + arguments: { 'pushType': 0, 'fingerprintItemData': state.fingerprintItemData.value, @@ -85,9 +83,9 @@ class _PalmDetailPageState extends State with RouteAware { } } else if (state.keyType.value == 4) { // 循环 - var data = await Get.toNamed( + final data = await Get.toNamed( Routers.otherTypeKeyChangeValidityDatePage, - arguments: { + arguments: { 'pushType': 0, 'fingerprintItemData': state.fingerprintItemData.value, @@ -111,9 +109,9 @@ class _PalmDetailPageState extends State with RouteAware { isHaveDirection: true, isHaveLine: true, action: () async { - var data = await Get.toNamed( + final data = await Get.toNamed( Routers.otherTypeKeyChangeValidityDatePage, - arguments: { + arguments: { 'pushType': 0, 'fingerprintItemData': state.fingerprintItemData.value, @@ -129,16 +127,16 @@ class _PalmDetailPageState extends State with RouteAware { } })))), Obx(() => Visibility( - visible: state.keyType.value == 4 ? true : false, + visible: state.keyType.value == 4, child: Obx(() => CommonItem( leftTitel: '有效时间', rightTitle: '${DateTool().dateToHNString(state.starTime.value)}-${DateTool().dateToHNString(state.endTime.value)}', isHaveDirection: true, action: () async { - var data = await Get.toNamed( + final data = await Get.toNamed( Routers.otherTypeKeyChangeValidityDatePage, - arguments: { + arguments: { 'pushType': 0, 'fingerprintItemData': state.fingerprintItemData.value, @@ -155,11 +153,11 @@ class _PalmDetailPageState extends State with RouteAware { })))), Container(height: 10.h), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.additive!.tr, + leftTitel: '添加者'.tr, rightTitle: state.adder.value, )), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.addTime!.tr, + leftTitel: '添加时间'.tr, rightTitle: DateTool() .dateToYMDHNString(state.addTime.value.toString()), )), @@ -178,7 +176,7 @@ class _PalmDetailPageState extends State with RouteAware { // addControlsBtn(type), SizedBox(height: 30.h), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, margin: EdgeInsets.only( @@ -197,8 +195,7 @@ class _PalmDetailPageState extends State with RouteAware { context: context, builder: (BuildContext context) { return ShowTFView( - title: - "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}", + title: '修改姓名'.tr, tipTitle: '', controller: state.changeNameController, sureClick: () { @@ -226,7 +223,7 @@ class _PalmDetailPageState extends State with RouteAware { tipTitle: '确定要删除吗?', sureClick: () async { Get.back(); - String? idStr = await Storage.getUid(); + // String? idStr = await Storage.getUid(); logic.senderAddICCard(); }, cancelClick: () { @@ -238,7 +235,6 @@ class _PalmDetailPageState extends State with RouteAware { @override void didChangeDependencies() { - // TODO: implement didChangeDependencies super.didChangeDependencies(); /// 路由订阅 @@ -247,7 +243,6 @@ class _PalmDetailPageState extends State with RouteAware { @override void dispose() { - // TODO: implement dispose /// 取消路由订阅 AppRouteObserver().routeObserver.unsubscribe(this); super.dispose(); @@ -265,7 +260,9 @@ class _PalmDetailPageState extends State with RouteAware { void didPop() { super.didPop(); logic.cancelBlueConnetctToastTimer(); - if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); + if (EasyLoading.isShow) { + EasyLoading.dismiss(animation: true); + } state.ifCurrentScreen.value = false; state.sureBtnState.value = 0; } @@ -282,7 +279,9 @@ class _PalmDetailPageState extends State with RouteAware { void didPushNext() { super.didPushNext(); logic.cancelBlueConnetctToastTimer(); - if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); + if (EasyLoading.isShow) { + EasyLoading.dismiss(animation: true); + } state.ifCurrentScreen.value = false; state.sureBtnState.value = 0; } diff --git a/lib/main/lockDetail/palm/palmList/palmList_page.dart b/lib/main/lockDetail/palm/palmList/palmList_page.dart index df52b2cc..0f35826f 100755 --- a/lib/main/lockDetail/palm/palmList/palmList_page.dart +++ b/lib/main/lockDetail/palm/palmList/palmList_page.dart @@ -39,7 +39,7 @@ class _PalmListPageState extends State { actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { @@ -268,7 +268,7 @@ class _PalmListPageState extends State { }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () { Navigator.pop(context); state.isDeletFaceData = true; diff --git a/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart b/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart index 7bb44309..cd0c487c 100755 --- a/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart +++ b/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart @@ -1,3 +1,4 @@ + import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -6,7 +7,6 @@ import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_state.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart'; -import 'package:star_lock/tools/commonDataManage.dart'; import 'package:star_lock/tools/showTFView.dart'; import 'package:star_lock/tools/showTipView.dart'; @@ -37,7 +37,7 @@ class _PasswordKeyDetailPageState extends State return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: TranslationLoader.lanKeys!.passwordDetail!.tr, + barTitle: '密码详情'.tr, haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ @@ -57,8 +57,7 @@ class _PasswordKeyDetailPageState extends State Obx(() => Visibility( visible: state.itemData.value.isCustom! == 1, child: CommonItem( - leftTitel: - "${"密码".tr}${TranslationLoader.lanKeys!.number!.tr}", + leftTitel: '密码号'.tr, rightTitle: state.itemData.value.pwdUserNo.toString(), isHaveDirection: false, isHaveLine: true), @@ -85,7 +84,7 @@ class _PasswordKeyDetailPageState extends State // showCupertinoAlertDialog( // context, state.inputNameController); // })), - Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr, + Obx(() => lockDataListItem('姓名'.tr, state.keyboardPwdName.value, () { showCupertinoAlertDialog( context, state.inputNameController); @@ -125,12 +124,12 @@ class _PasswordKeyDetailPageState extends State // )), Container(height: 10.h), CommonItem( - leftTitel: TranslationLoader.lanKeys!.sender!.tr, + leftTitel: '发送人'.tr, rightTitle: state.itemData.value.senderUsername, isHaveLine: true, action: () {}), CommonItem( - leftTitel: TranslationLoader.lanKeys!.senderTime!.tr, + leftTitel: '发送时间'.tr, rightTitle: getSenderDate(state.itemData.value), action: () {}), Container(height: 10.h), @@ -174,7 +173,7 @@ class _PasswordKeyDetailPageState extends State height: 30.h, ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, margin: EdgeInsets.only( @@ -288,8 +287,8 @@ class _PasswordKeyDetailPageState extends State state.ifCurrentScreen.value = true; return ShowTFView( title: inputController == state.inputNameController - ? '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}' - : '${TranslationLoader.lanKeys!.amend!.tr}${'密码'.tr}', + ? '修改姓名'.tr + : '修改密码'.tr, tipTitle: inputController.text.isNotEmpty ? inputController.text : '请输入6-9位密码', @@ -459,7 +458,6 @@ class _PasswordKeyDetailPageState extends State @override void didChangeDependencies() { - // TODO: implement didChangeDependencies super.didChangeDependencies(); /// 路由订阅 @@ -468,7 +466,6 @@ class _PasswordKeyDetailPageState extends State @override void dispose() { - // TODO: implement dispose /// 取消路由订阅 AppRouteObserver().routeObserver.unsubscribe(this); super.dispose(); diff --git a/lib/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_page.dart b/lib/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_page.dart index b3941e90..fbe193a4 100755 --- a/lib/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_page.dart +++ b/lib/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_page.dart @@ -32,13 +32,13 @@ class _PasswordKeyDetailChangeDatePage extends State[ TextButton( child: Text( - TranslationLoader.lanKeys!.sure!.tr, + '确定'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () { @@ -111,7 +111,7 @@ class _PasswordKeyDetailChangeDatePage extends State[ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.selectEffectiveDate.value, isHaveLine: true, isHaveDirection: true, @@ -123,7 +123,7 @@ class _PasswordKeyDetailChangeDatePage extends State CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.selectFailureDate.value, isHaveDirection: true, action: () { diff --git a/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart b/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart index 04604367..ac96dbb8 100755 --- a/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart +++ b/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart @@ -61,7 +61,7 @@ class _PasswordKeyListPageState extends State actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { @@ -111,7 +111,7 @@ class _PasswordKeyListPageState extends State height: 20.h, ), AddBottomWhiteBtn( - btnName: TranslationLoader.lanKeys!.getPassword!.tr, + btnName: '获取密码'.tr, onClick: () { Navigator.pushNamed( context, Routers.passwordKeyPerpetualPage, diff --git a/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart b/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart index ffcf2ab3..13dab788 100755 --- a/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart +++ b/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart @@ -64,7 +64,7 @@ class _PasswordKeyPerpetualPageState extends State return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: TranslationLoader.lanKeys!.getPassword!.tr, + barTitle: '获取密码'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: Column( @@ -90,8 +90,8 @@ class _PasswordKeyPerpetualPageState extends State children: [ perpetualKeyWidget( false, - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, + '姓名'.tr, + '请给密码命名'.tr, state.nameController), keyBottomWidget( '密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。' @@ -109,8 +109,8 @@ class _PasswordKeyPerpetualPageState extends State keyTimeLimitWidget(), perpetualKeyWidget( false, - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, + '姓名'.tr, + '请给密码命名'.tr, state.nameController), keyBottomWidget( '密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。' @@ -127,11 +127,11 @@ class _PasswordKeyPerpetualPageState extends State children: [ perpetualKeyWidget( false, - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, + '姓名'.tr, + '请给密码命名'.tr, state.nameController), keyBottomWidget( - TranslationLoader.lanKeys!.getPasswordTip3!.tr) + '密码有限期为6个小时,只能使用一次'.tr) ], ), ); @@ -149,8 +149,8 @@ class _PasswordKeyPerpetualPageState extends State Container(), perpetualKeyWidget( false, - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, + '姓名'.tr, + '请给密码命名'.tr, state.nameController), perpetualKeyWidget( false, @@ -159,7 +159,7 @@ class _PasswordKeyPerpetualPageState extends State state.pwdController), keyIfAdministratorWidget(), keyBottomWidget( - TranslationLoader.lanKeys!.getPasswordTip4!.tr) + '手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加'.tr) ], ), ); @@ -173,8 +173,8 @@ class _PasswordKeyPerpetualPageState extends State keyCirculationWidget(), perpetualKeyWidget( true, - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, + '姓名'.tr, + '请给密码命名'.tr, state.nameController), keyBottomWidget( '密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。' @@ -191,8 +191,8 @@ class _PasswordKeyPerpetualPageState extends State children: [ perpetualKeyWidget( false, - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, + '姓名'.tr, + '请给密码命名'.tr, state.nameController), keyBottomWidget('清空密码底部提示'.tr) ], @@ -228,7 +228,7 @@ class _PasswordKeyPerpetualPageState extends State Visibility( visible: CommonDataManage().currentKeyInfo.vendor != 'XHJ', child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, @@ -249,7 +249,7 @@ class _PasswordKeyPerpetualPageState extends State }), ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { @@ -282,7 +282,7 @@ class _PasswordKeyPerpetualPageState extends State return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.customBeginTime.value, isHaveLine: true, isHaveDirection: true, @@ -299,7 +299,7 @@ class _PasswordKeyPerpetualPageState extends State }); }), CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.customEndTime.value, isHaveDirection: true, action: () { @@ -324,7 +324,7 @@ class _PasswordKeyPerpetualPageState extends State return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.permanent!.tr, + leftTitel: '永久'.tr, rightTitle: '', isHaveRightWidget: true, rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch())), @@ -403,7 +403,7 @@ class _PasswordKeyPerpetualPageState extends State }), ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.loopEffectiveDate.value, isHaveLine: true, isHaveDirection: true, @@ -419,7 +419,7 @@ class _PasswordKeyPerpetualPageState extends State }, hourShow24: true); }), CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.loopFailureDate.value, isHaveDirection: true, action: () { @@ -475,7 +475,7 @@ class _PasswordKeyPerpetualPageState extends State SubmitBtn( btnName: state.widgetType.value == 3 ? '设置密码' - : TranslationLoader.lanKeys!.getPassword!.tr, + : '获取密码'.tr, onClick: () async { final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { @@ -768,12 +768,12 @@ class _PasswordKeyPerpetualPageState extends State } final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '1'), - ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: '2'), - ItemView(title: TranslationLoader.lanKeys!.custom!.tr, type: '3'), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: '4'), - ItemView(title: TranslationLoader.lanKeys!.clearAll!.tr, type: '5'), + ItemView(title: '永久'.tr, type: '0'), + ItemView(title: '限时'.tr, type: '1'), + ItemView(title: '单次'.tr, type: '2'), + ItemView(title: '自定义'.tr, type: '3'), + ItemView(title: '循环'.tr, type: '4'), + ItemView(title: '清空'.tr, type: '5'), ]; List initBottomSheetList() { diff --git a/lib/main/lockDetail/remoteControl/addRemoteControlType/addRemoteControlType_page.dart b/lib/main/lockDetail/remoteControl/addRemoteControlType/addRemoteControlType_page.dart index 30332b5c..a3dc64f1 100755 --- a/lib/main/lockDetail/remoteControl/addRemoteControlType/addRemoteControlType_page.dart +++ b/lib/main/lockDetail/remoteControl/addRemoteControlType/addRemoteControlType_page.dart @@ -11,7 +11,6 @@ import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart'; import '../../../../appRouters.dart'; import '../../../../app_settings/app_colors.dart'; import '../../../../tools/CustomUnderlineTabIndicator.dart'; -import '../../../../tools/commonDataManage.dart'; import '../../../../tools/commonItem.dart'; import '../../../../tools/dateTool.dart'; import '../../../../tools/storage.dart'; @@ -78,8 +77,8 @@ class _AddRemoteControlTypePageState extends State wit child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyBottomWidget() ], @@ -93,8 +92,8 @@ class _AddRemoteControlTypePageState extends State wit child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyTimeLimitWidget(), // SizedBox(height: 10.h), @@ -110,8 +109,8 @@ class _AddRemoteControlTypePageState extends State wit child: Column( children: [ perpetualKeyWidget( - TranslationLoader.lanKeys!.name!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '姓名'.tr, + '请输入'.tr, state.nameController), keyCyclicDate(), SizedBox(height: 10.h), @@ -145,7 +144,7 @@ class _AddRemoteControlTypePageState extends State wit return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.timeLimitBeginTime.value, isHaveLine: true, isHaveDirection: true, @@ -159,7 +158,7 @@ class _AddRemoteControlTypePageState extends State wit }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.timeLimitEndTime.value, isHaveDirection: true, action: () { @@ -181,14 +180,13 @@ class _AddRemoteControlTypePageState extends State wit return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel: '有效期'.tr, rightTitle: '${state.cycleBeginTime.value}\n${state.cycleEndTime.value}', isHaveDirection: true, isHaveLine: true, action: () async { - final result = - await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { + final result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: { 'validityValue': state.weekdaysList.value, 'starDate': state.cycleBeginTime.value, 'endDate': state.cycleEndTime.value, @@ -383,10 +381,9 @@ class _AddRemoteControlTypePageState extends State wit } final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'), - ItemView( - title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'), + ItemView(title: '永久'.tr, selectType: '0'), + ItemView(title: '限时'.tr, selectType: '1'), + ItemView(title: '循环'.tr, selectType: '2'), ]; diff --git a/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_page.dart b/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_page.dart index d08386b7..ee0b3ec5 100755 --- a/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_page.dart +++ b/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_page.dart @@ -45,13 +45,8 @@ class _RemoteControlDetailPageState extends State with rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => lockDataListItem( - TranslationLoader.lanKeys!.name!.tr, state.typeName.value, - () { - ShowTipView().showTFViewAlertDialog( - state.changeNameController, - '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}', - '', () { + Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () { + ShowTipView().showTFViewAlertDialog(state.changeNameController, '修改姓名'.tr, '', () { if (state.changeNameController.text.isEmpty) { logic.showToast('请输入姓名'.tr); return; @@ -69,7 +64,7 @@ class _RemoteControlDetailPageState extends State with state.keyType.value == 2 || state.keyType.value == 1, child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + leftTitel:'有效期'.tr, allHeight: 70.h, rightTitle: logic.getKeyTypeShowDateTime(), isHaveDirection: true, @@ -77,7 +72,7 @@ class _RemoteControlDetailPageState extends State with action: () async { if (state.keyType.value == 2 || state.keyType.value == 1) { // 限时 - var data = await Get.toNamed( + final data = await Get.toNamed( Routers.otherTypeKeyChangeDatePage, arguments: { 'pushType': 2, @@ -163,12 +158,12 @@ class _RemoteControlDetailPageState extends State with })))), Container(height: 10.h), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.additive!.tr, + leftTitel: '添加者'.tr, isHaveLine: true, rightTitle: state.adder.value, )), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.addTime!.tr, + leftTitel: '添加时间'.tr, rightTitle: DateTool() .dateToYMDHNString(state.addTime.value.toString()), )), @@ -205,7 +200,7 @@ class _RemoteControlDetailPageState extends State with // addControlsBtn(type), SizedBox(height: 30.h), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, margin: EdgeInsets.only( diff --git a/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart b/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart index 949bd711..f217c93f 100755 --- a/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart +++ b/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart @@ -62,7 +62,7 @@ class _RemoteControlListPageState extends State with Rout actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.reset!.tr, + '重置'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { diff --git a/lib/main/lockMian/lockList/lockList_logic.dart b/lib/main/lockMian/lockList/lockList_logic.dart index 64d60678..3796c66b 100755 --- a/lib/main/lockMian/lockList/lockList_logic.dart +++ b/lib/main/lockMian/lockList/lockList_logic.dart @@ -308,7 +308,7 @@ class LockListLogic extends BaseGetXController { content: Text(content), actions: [ CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: Get.back, ), ], diff --git a/lib/mine/addLock/saveLock/saveLock_page.dart b/lib/mine/addLock/saveLock/saveLock_page.dart index 9f88eb0a..b8cc25cf 100755 --- a/lib/mine/addLock/saveLock/saveLock_page.dart +++ b/lib/mine/addLock/saveLock/saveLock_page.dart @@ -113,7 +113,7 @@ class _SaveLockPageState extends State with RouteAware { height: 120.h, ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, margin: EdgeInsets.only( left: 50.w, diff --git a/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart b/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart index d1794ef5..660ed8b4 100755 --- a/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart +++ b/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart @@ -125,8 +125,7 @@ class _GatewayConfigurationWifiPageState isHaveRightWidget: true, rightWidget: getTFWidget( _gatewayNamePassward, - TranslationLoader - .lanKeys!.pleaseEnter!.tr)), + '请输入'.tr,)), CommonItem( leftTitel: TranslationLoader .lanKeys!.alternativeDNS!.tr, @@ -135,8 +134,7 @@ class _GatewayConfigurationWifiPageState isHaveRightWidget: true, rightWidget: getTFWidget( _gatewayNamePassward, - TranslationLoader - .lanKeys!.pleaseEnter!.tr)), + '请输入'.tr,)), ], )), ], @@ -147,7 +145,7 @@ class _GatewayConfigurationWifiPageState Container( margin: EdgeInsets.only(left: 20.w, right: 20.w), child: SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, borderRadius: 20.w, margin: EdgeInsets.only( left: 30.w, right: 30.w, top: 20.w, bottom: 20.w), diff --git a/lib/mine/gateway/gatewayDetail/gatewayDetail_page.dart b/lib/mine/gateway/gatewayDetail/gatewayDetail_page.dart index d10e9edb..b68780dd 100755 --- a/lib/mine/gateway/gatewayDetail/gatewayDetail_page.dart +++ b/lib/mine/gateway/gatewayDetail/gatewayDetail_page.dart @@ -32,7 +32,7 @@ class _GatewayDetailPageState extends State { children: [ CommonItem( leftTitel: TranslationLoader.lanKeys!.designation!.tr, - rightTitle: "星锁网关", + rightTitle: '星锁网关', isHaveLine: true, isHaveDirection: true, action: () { @@ -40,17 +40,17 @@ class _GatewayDetailPageState extends State { }), CommonItem( leftTitel: TranslationLoader.lanKeys!.state!.tr, - rightTitle: "在线", + rightTitle: '在线', isHaveLine: true, isHaveDirection: false), CommonItem( leftTitel: TranslationLoader.lanKeys!.wifiName!.tr, - rightTitle: "XinHongJia", + rightTitle: 'XinHongJia', isHaveLine: true, isHaveDirection: false), CommonItem( leftTitel: TranslationLoader.lanKeys!.networkMAC!.tr, - rightTitle: "39:23:df:34:12", + rightTitle: '39:23:df:34:12', isHaveLine: false, isHaveDirection: false), SizedBox( @@ -58,7 +58,7 @@ class _GatewayDetailPageState extends State { ), CommonItem( leftTitel: TranslationLoader.lanKeys!.nearbyLock!.tr, - rightTitle: "2", + rightTitle: '2', isHaveLine: true, isHaveDirection: true, action: () { @@ -66,7 +66,7 @@ class _GatewayDetailPageState extends State { }), CommonItem( leftTitel: TranslationLoader.lanKeys!.gatewayUpgrade!.tr, - rightTitle: "", + rightTitle: '', isHaveLine: false, isHaveDirection: true, action: () {}), @@ -74,7 +74,7 @@ class _GatewayDetailPageState extends State { height: 80.h, ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, isDelete: true, borderRadius: 20.w, fontSize: 32.sp, @@ -92,9 +92,8 @@ class _GatewayDetailPageState extends State { context: context, builder: (BuildContext context) { return ShowTFView( - title: - "${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", - tipTitle: "请输入", + title: '修改姓名'.tr, + tipTitle: '请输入', controller: _changeGatewayNameController); }); } diff --git a/lib/mine/mine/safeVerify/safeVerify_page.dart b/lib/mine/mine/safeVerify/safeVerify_page.dart index a50df4a2..01f1b863 100755 --- a/lib/mine/mine/safeVerify/safeVerify_page.dart +++ b/lib/mine/mine/safeVerify/safeVerify_page.dart @@ -58,7 +58,7 @@ class _SafeVerifyPageState extends State { decoration: InputDecoration( contentPadding: const EdgeInsets.only(left: 5, top: -8, bottom: 6), - hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}', + hintText: '请输入验证码'.tr, hintStyle: TextStyle(fontSize: 22.sp, height: 1.0), //不需要输入框下划线 border: const OutlineInputBorder(), diff --git a/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_page.dart b/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_page.dart index 1b6dcd70..ed736c82 100755 --- a/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_page.dart +++ b/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_page.dart @@ -59,12 +59,9 @@ class _MineUnbindPhoneOrEmailState extends State { onChangeAction: () { logic.checkNext(state.codeController); }, - label: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}", + label: '请输入验证码'.tr, rightSlot: GestureDetector( - onTap: state.canResend.value ?() { - logic.sendValidationCode(); - } : null, + onTap: state.canResend.value ?logic.sendValidationCode : null, child: Container( width: 180.w, height: 90.h, diff --git a/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart b/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart index ff8bb9d7..8dabf109 100755 --- a/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart +++ b/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_page.dart @@ -57,7 +57,7 @@ class _MinePersonInfoEditAccountNextPageState left: 30.w, right: 30.w, top: 10.h, bottom: 10.h), child: TFInputHaveBorder( controller: state.accountController, - label: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + label: '请输入手机号或者邮箱'.tr, ), ), Container( @@ -66,7 +66,7 @@ class _MinePersonInfoEditAccountNextPageState child: TFInputHaveBorder( controller: state.codeController, label: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}", + '请输入验证码'.tr, rightSlot: GestureDetector( child: Container( width: 180.w, @@ -79,7 +79,7 @@ class _MinePersonInfoEditAccountNextPageState // ), child: Center( child: Text( - '${TranslationLoader.lanKeys!.getTip!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}', + '${"获取".tr}${TranslationLoader.lanKeys!.verificationCode!.tr}', textAlign: TextAlign.center, style: TextStyle( color: Colors.grey, @@ -92,7 +92,7 @@ class _MinePersonInfoEditAccountNextPageState ), SizedBox(height: 50.w), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart b/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart index 59965e8e..a3d88782 100755 --- a/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart +++ b/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart @@ -107,7 +107,7 @@ class _MinePersonInfoEditIphonePageState isPwd: true, leftWidget: const SizedBox(), hintText: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}", + '请输入验证码'.tr, inputFormatters: [ // LengthLimitingTextInputFormatter(20), ]), @@ -126,7 +126,7 @@ class _MinePersonInfoEditIphonePageState child: Center( child: Text( _seconds == 60 - ? '${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}' + ? '${"获取".tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}' : (_seconds < 10) ? '0$_seconds s' : '$_seconds s', @@ -149,7 +149,7 @@ class _MinePersonInfoEditIphonePageState ), SizedBox(height: 50.w), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/lib/mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart b/lib/mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart index ab1f17c7..9e7cc817 100755 --- a/lib/mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart +++ b/lib/mine/minePersonInfo/minePersonInfoEditName/minePersonInfoEditName_page.dart @@ -90,7 +90,7 @@ class _MinePersonInfoEditNamePageState isPwd: false, leftWidget: SizedBox(width: 15.w), hintText: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.nickName!.tr}", + "${'请输入'.tr}${TranslationLoader.lanKeys!.nickName!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), diff --git a/lib/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart b/lib/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart index 98bd67e7..22f156d3 100755 --- a/lib/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart +++ b/lib/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart @@ -94,8 +94,8 @@ class _MineBindPhoneOrEmailPageState extends State { }, leftWidget: const SizedBox(), hintText: state.channel.value == '1' - ? '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.mobileNumber!.tr}' - : '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.email!.tr}', + ? '${'请输入'.tr}${TranslationLoader.lanKeys!.mobileNumber!.tr}' + : '${'请输入'.tr}${TranslationLoader.lanKeys!.email!.tr}', inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), @@ -111,7 +111,7 @@ class _MineBindPhoneOrEmailPageState extends State { logic.checkNext(state.codeController); }, hintText: - '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}', + '${'请输入'.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}', inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), @@ -150,7 +150,7 @@ class _MineBindPhoneOrEmailPageState extends State { SizedBox(height: 50.w), Obx(() { return SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart b/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart index eaae73e9..576c34cd 100755 --- a/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart +++ b/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart @@ -86,7 +86,7 @@ class _MinePersonInfoSetSafetyProblemPageState Obx(() => Container( padding: EdgeInsets.only(left: 20.w, right: 20.w), child: SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, isDisabled: state.canSub.value, onClick: () { if (state.isUpdateAnswer.value) { diff --git a/lib/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart b/lib/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart index 5994645e..784e6511 100755 --- a/lib/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart +++ b/lib/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart @@ -57,7 +57,7 @@ class _MinePersonInfoViewSafetyProblemPageState }); }, child: Text( - TranslationLoader.lanKeys!.amend!.tr, + '修改'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), )) ], @@ -89,7 +89,7 @@ class _MinePersonInfoViewSafetyProblemPageState children: [ CommonItem( leftTitel: problemTitle, - rightTitle: "", + rightTitle: '', isHaveLine: true, isHaveDirection: true), Container( diff --git a/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart b/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart index bf54c19c..63f4e28c 100755 --- a/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart +++ b/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart @@ -129,7 +129,7 @@ class _APPUnlockNeedMobileNetworkingLockPageState extends State TabController? _tabController; final FlutterContactPicker _contactPicker = FlutterContactPicker(); late Contact _contact; - final _templateNameTf = TextEditingController(); + final TextEditingController _templateNameTf = TextEditingController(); bool isNameSelect = false; bool isDeviceSelect = false; int selectDeviceIndex = 0; @@ -32,7 +33,7 @@ class _AuthorityManagementPageState extends State List dataList = []; List tabs = [ - TranslationLoader.lanKeys!.name!.tr, + '姓名'.tr, TranslationLoader.lanKeys!.device!.tr ]; @@ -85,33 +86,33 @@ class _AuthorityManagementPageState extends State )), ), ), - body: TabBarView(controller: _tabController, children: [ - dataList.isEmpty ? NoData() : _permissionNameList(), - dataList.isEmpty ? NoData() : _permissionDeviceList() + body: TabBarView(controller: _tabController, children: [ + if (dataList.isEmpty) NoData() else _permissionNameList(), + if (dataList.isEmpty) NoData() else _permissionDeviceList() ]))); } //姓名列表 Widget _permissionNameList() { return Column( - children: [ + children: [ SizedBox( height: 10.h, ), Expanded( child: ListView.separated( - itemBuilder: (context, index) { + itemBuilder: (BuildContext context, int index) { if (index == 0) { - return _buildNameExpandedList(context, index, "张三"); + return _buildNameExpandedList(context, index, '张三'); } else if (index == 1) { - return _buildNameExpandedList(context, index, "李四"); + return _buildNameExpandedList(context, index, '李四'); } else if (index == 2) { - return _buildNameExpandedList(context, index, "王二"); + return _buildNameExpandedList(context, index, '王二'); } else { - return _buildNameExpandedList(context, index, "麻子"); + return _buildNameExpandedList(context, index, '麻子'); } }, - separatorBuilder: (context, index) { + separatorBuilder: (BuildContext context, int index) { return const Divider( height: 1, color: AppColors.greyLineColor, @@ -132,24 +133,24 @@ class _AuthorityManagementPageState extends State //设备列表 Widget _permissionDeviceList() { return Column( - children: [ + children: [ SizedBox( height: 10.h, ), Expanded( child: ListView.separated( - itemBuilder: (context, index) { + itemBuilder: (BuildContext context, int index) { if (index == 0) { - return _buildDeviceExpandedList(context, index, "大门锁"); + return _buildDeviceExpandedList(context, index, '大门锁'); } else if (index == 1) { - return _buildDeviceExpandedList(context, index, "办公室锁"); + return _buildDeviceExpandedList(context, index, '办公室锁'); } else if (index == 2) { - return _buildDeviceExpandedList(context, index, "会议室锁"); + return _buildDeviceExpandedList(context, index, '会议室锁'); } else { - return _buildDeviceExpandedList(context, index, "宴会厅锁"); + return _buildDeviceExpandedList(context, index, '宴会厅锁'); } }, - separatorBuilder: (context, index) { + separatorBuilder: (BuildContext context, int index) { return const Divider( height: 1, color: AppColors.greyLineColor, @@ -181,7 +182,7 @@ class _AuthorityManagementPageState extends State physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: 10, - itemBuilder: (_, index) { + itemBuilder: (_, int index) { if (index == 0) { return _buildNameWidget( context, index, 'images/icon_password.png', '张三'); @@ -222,19 +223,19 @@ class _AuthorityManagementPageState extends State physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: 5, - itemBuilder: (_, index) { + itemBuilder: (_, int index) { if (index == 0) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', "大门锁"); + context, index, 'images/icon_lock.png', '大门锁'); } else if (index == 1) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', "办公室锁"); + context, index, 'images/icon_lock.png', '办公室锁'); } else if (index == 2) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', "会议室锁"); + context, index, 'images/icon_lock.png', '会议室锁'); } else { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', "宴会厅锁"); + context, index, 'images/icon_lock.png', '宴会厅锁'); } }, separatorBuilder: (BuildContext context, int index) { @@ -255,7 +256,7 @@ class _AuthorityManagementPageState extends State color: Colors.white, width: ScreenUtil().screenWidth, child: Row( - children: [ + children: [ SizedBox( width: 30.w, ), @@ -297,7 +298,7 @@ class _AuthorityManagementPageState extends State color: Colors.white, width: ScreenUtil().screenWidth, child: Row( - children: [ + children: [ SizedBox( width: 30.w, ), diff --git a/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministratorManage/addAuthorizedAdministratorManage_tabbar.dart b/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministratorManage/addAuthorizedAdministratorManage_tabbar.dart index b7798c23..216d0085 100755 --- a/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministratorManage/addAuthorizedAdministratorManage_tabbar.dart +++ b/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministratorManage/addAuthorizedAdministratorManage_tabbar.dart @@ -9,9 +9,8 @@ import '../../../../../translations/trans_lib.dart'; import '../addAuthorizedAdministrator_page.dart'; class AddAuthorizedAdministratorManageTabbar extends StatefulWidget { - var initialIndex = 1; - - AddAuthorizedAdministratorManageTabbar({Key? key, required this.initialIndex}) : super(key: key); + AddAuthorizedAdministratorManageTabbar({required this.initialIndex, Key? key}) : super(key: key); + int initialIndex = 1; @override State createState() => _AddAuthorizedAdministratorManageTabbarState(); @@ -21,13 +20,12 @@ class _AddAuthorizedAdministratorManageTabbarState extends State _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"), - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"), + ItemView(title: '限时'.tr, type: '0'), + ItemView(title: '永久'.tr, type: '1'), ]; @override void initState() { - // TODO: implement initState super.initState(); _tabController = TabController( vsync: this, @@ -45,7 +43,7 @@ class _AddAuthorizedAdministratorManageTabbarState extends State[ _tabBar(), _pageWidget(), ], @@ -55,8 +53,8 @@ class _AddAuthorizedAdministratorManageTabbarState extends State _tab(item)).toList(), - onTap: (index){ + tabs: _itemTabs.map(_tab).toList(), + onTap: (int index){ FocusScope.of(context).requestFocus(FocusNode()); }, isScrollable: true, diff --git a/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart b/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart index 1f662726..fab92204 100755 --- a/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart +++ b/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart @@ -100,7 +100,7 @@ class AddAuthorizedAdministratorLogic extends BaseGetXController { onPressed: Get.back, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () async { //选择国家代码 Get.back(); diff --git a/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart b/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart index 21d8d2d7..9dc930e0 100755 --- a/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart +++ b/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart @@ -64,9 +64,9 @@ class _AddAuthorizedAdministratorPageState height: 10.h, ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.lock!.tr, + leftTitel: '锁'.tr, rightTitle: state.lockIdList.value.isEmpty - ? TranslationLoader.lanKeys!.pleaseSelect!.tr + ? '请选择'.tr : state.lockIdList.value.length.toString(), isHaveDirection: true, action: () async { @@ -124,9 +124,9 @@ class _AddAuthorizedAdministratorPageState keyTimeWidget(), SizedBox(height: 10.h), CommonItem( - leftTitel: TranslationLoader.lanKeys!.lock!.tr, + leftTitel: '锁'.tr, rightTitle: state.lockIdList.value.isEmpty - ? TranslationLoader.lanKeys!.pleaseSelect!.tr + ? '请选择'.tr : state.lockIdList.value.length.toString(), isHaveDirection: true, action: () async { @@ -183,7 +183,7 @@ class _AddAuthorizedAdministratorPageState isHaveRightWidget: true, rightWidget: getTFWidget( true, - TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + '请输入手机号或者邮箱'.tr, state.emailOrPhoneController)), CommonItem( leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr, @@ -209,12 +209,12 @@ class _AddAuthorizedAdministratorPageState }, ), CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: '', isHaveRightWidget: true, rightWidget: getTFWidget( false, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '请输入'.tr, state.keyNameController)), ], ); @@ -334,7 +334,7 @@ class _AddAuthorizedAdministratorPageState return Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginDate.value, isHaveLine: true, isHaveDirection: true, @@ -349,7 +349,7 @@ class _AddAuthorizedAdministratorPageState }); }), CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endDate.value, isHaveDirection: true, action: () { @@ -383,7 +383,7 @@ class _AddAuthorizedAdministratorPageState ), ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sender!.tr, + btnName: '发送人'.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -428,7 +428,7 @@ class _AddAuthorizedAdministratorPageState Widget _buildSureBtn() { return SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, onClick: () { logic.addAuthorizedAdminRequest(); }, diff --git a/lib/mine/mineSet/authorizedAdministrator/administratorChangeDate/adminDetailChangeDate_page.dart b/lib/mine/mineSet/authorizedAdministrator/administratorChangeDate/adminDetailChangeDate_page.dart index e6da7317..a0bbf288 100755 --- a/lib/mine/mineSet/authorizedAdministrator/administratorChangeDate/adminDetailChangeDate_page.dart +++ b/lib/mine/mineSet/authorizedAdministrator/administratorChangeDate/adminDetailChangeDate_page.dart @@ -32,14 +32,13 @@ class _AdminDetailChangeDatePageState extends State { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: - '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}', + barTitle: '修改有效期'.tr, haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.sure!.tr, + '确定'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: logic.updateAdministratorRequest, @@ -54,7 +53,7 @@ class _AdminDetailChangeDatePageState extends State { return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, @@ -69,7 +68,7 @@ class _AdminDetailChangeDatePageState extends State { }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { diff --git a/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart b/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart index d241cd34..99ba5a74 100755 --- a/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart +++ b/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart @@ -1,3 +1,4 @@ + import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -55,7 +56,7 @@ class _AdministratorDetailsPageState extends State { body: Obx(() => Column( children: [ CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, + leftTitel: '姓名'.tr, rightTitle: state.nameStr.value, isHaveDirection: true, isHaveLine: true, @@ -63,7 +64,7 @@ class _AdministratorDetailsPageState extends State { showCupertinoAlertDialog(context); }), CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, allHeight: 90.h, rightTitle: logic.getUseDateStr(), isHaveDirection: true, @@ -84,7 +85,7 @@ class _AdministratorDetailsPageState extends State { }), Container(height: 10.h), CommonItem( - leftTitel: TranslationLoader.lanKeys!.lock!.tr, + leftTitel: '锁'.tr, rightTitle: state.itemData.value.lockNum.toString(), isHaveDirection: true, action: () { @@ -109,7 +110,7 @@ class _AdministratorDetailsPageState extends State { child: _onlyManageYouCreatesUserSwitch())), Container(height: 40.h), SubmitBtn( - btnName: TranslationLoader.lanKeys!.delete!.tr, + btnName: '删除'.tr, borderRadius: 20.w, isDelete: true, margin: EdgeInsets.only( @@ -210,7 +211,7 @@ class _AdministratorDetailsPageState extends State { context: context, builder: (BuildContext context) { return ShowTFView( - title: '${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}', + title: '修改姓名'.tr, tipTitle: '请输入'.tr, controller: state.changeNameController, sureClick: () { diff --git a/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart b/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart index e044ba91..9ee28a8f 100755 --- a/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart +++ b/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart @@ -37,7 +37,7 @@ class _GroupEditLockPageState extends State { appBar: TitleAppBar( barTitle: state.type == 0 ? TranslationLoader.lanKeys!.add!.tr - : TranslationLoader.lanKeys!.delete!.tr, + : '删除'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: Column( @@ -61,7 +61,7 @@ class _GroupEditLockPageState extends State { Obx(() => Visibility( visible: state.isVip.value, child: SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, + btnName: '确定'.tr, onClick: () async { final List idList = []; for (int i = 0; i < state.lockList.length; i++) { diff --git a/lib/mine/mineSet/lockGroup/lockGroupDetailList/lockItemList_page.dart b/lib/mine/mineSet/lockGroup/lockGroupDetailList/lockItemList_page.dart index 5614c69a..d28054ea 100755 --- a/lib/mine/mineSet/lockGroup/lockGroupDetailList/lockItemList_page.dart +++ b/lib/mine/mineSet/lockGroup/lockGroupDetailList/lockItemList_page.dart @@ -139,7 +139,7 @@ class _LockItemListPageState extends State { builder: (BuildContext context) { return AlertBottomWidget( topTitle: '', - items: [TranslationLoader.lanKeys!.add!.tr, TranslationLoader.lanKeys!.delete!.tr], + items: [TranslationLoader.lanKeys!.add!.tr, '删除'.tr], chooseCallback: (value) { int getSelectIndex = value; if (getSelectIndex == 0) { diff --git a/lib/mine/mineSet/lockGroup/lockGroupList/lockGroupList_page.dart b/lib/mine/mineSet/lockGroup/lockGroupList/lockGroupList_page.dart index 458acf3b..7704bb5c 100755 --- a/lib/mine/mineSet/lockGroup/lockGroupList/lockGroupList_page.dart +++ b/lib/mine/mineSet/lockGroup/lockGroupList/lockGroupList_page.dart @@ -48,7 +48,7 @@ class _LockGroupListPageState extends State { ShowTipView().showTFViewAlertDialog( state.changeNameController, TranslationLoader.lanKeys!.createNewGroup!.tr, - TranslationLoader.lanKeys!.pleaseEnter!.tr, () { + '请输入'.tr, () { //发送编辑钥匙名称请求 if (state.changeNameController.text.isNotEmpty) { Navigator.of(context).pop(); @@ -157,7 +157,7 @@ class _LockGroupListPageState extends State { color: const Color(0xFFF20101), alignment: Alignment.center, child: Text( - TranslationLoader.lanKeys!.delete!.tr, + '删除'.tr, style: const TextStyle( fontSize: 16, fontWeight: FontWeight.w500, @@ -177,7 +177,7 @@ class _LockGroupListPageState extends State { // showCupertinoAlertDialog(context, false, groupListItem.keyGroupId!); ShowTipView().showTFViewAlertDialog(state.changeNameController, - '修改名称'.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, () { + '修改名称'.tr, '请输入'.tr, () { if (state.changeNameController.text.isNotEmpty) { Get.back(); logic.editLockGroupRequest(groupListItem.keyGroupId!); diff --git a/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeDate/expireKeyChangeDate_page.dart b/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeDate/expireKeyChangeDate_page.dart index 0d6f22e0..30c543a8 100644 --- a/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeDate/expireKeyChangeDate_page.dart +++ b/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeDate/expireKeyChangeDate_page.dart @@ -32,14 +32,13 @@ class _ExpireKeyChangeDatePageState extends State with return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: - '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}', + barTitle: '修改有效期'.tr, haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ TextButton( child: Text( - TranslationLoader.lanKeys!.sure!.tr, + '确定'.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () { @@ -92,7 +91,7 @@ class _ExpireKeyChangeDatePageState extends State with return Column( children: [ Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + leftTitel: '生效时间'.tr, rightTitle: state.beginTime.value, isHaveLine: true, isHaveDirection: true, @@ -107,7 +106,7 @@ class _ExpireKeyChangeDatePageState extends State with }); })), Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + leftTitel: '失效时间'.tr, rightTitle: state.endTime.value, isHaveDirection: true, action: () { diff --git a/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeValidityDate/expireKeyChangeValidityDate_page.dart b/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeValidityDate/expireKeyChangeValidityDate_page.dart index 336c4514..30127ec6 100644 --- a/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeValidityDate/expireKeyChangeValidityDate_page.dart +++ b/lib/mine/mineSet/lockUserManage/expireLockList/expireKeyChangeValidityDate/expireKeyChangeValidityDate_page.dart @@ -177,25 +177,25 @@ class _ExpireKeyChangeValidityDatePageState extends State { }); }, child: Text( - TranslationLoader.lanKeys!.sendGroupKey!.tr, + '群发钥匙'.tr, style: TextStyle( color: AppColors.mainColor, fontSize: 24.sp, diff --git a/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_logic.dart b/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_logic.dart index d4bec36e..047071e9 100755 --- a/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_logic.dart +++ b/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_logic.dart @@ -109,7 +109,7 @@ class RecipientInformationLogic extends BaseGetXController{ onPressed: Get.back, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () { Get.back(); removeBrokenLockData(); diff --git a/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart b/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart index 1edf9c7f..b7674d2f 100755 --- a/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart +++ b/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart @@ -92,7 +92,7 @@ class _ValueAddedServicesHighFunctionPageState ), SizedBox(height: 5.h), Obx(() => Text( - '${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}', + '${'有效期'.tr}:${state.vipExpireDate.value}', style: TextStyle( fontSize: 20.sp, fontWeight: FontWeight.w600), )), @@ -233,7 +233,7 @@ class _ValueAddedServicesHighFunctionPageState _buildItem('images/mine/icon_mine_highFunctionContent_sfz.png', TranslationLoader.lanKeys!.lockGroup!.tr), _buildItem('images/mine/icon_mine_highFunctionContent_bjft.png', - TranslationLoader.lanKeys!.sendGroupKey!.tr), + '群发钥匙'.tr), // _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", // TranslationLoader.lanKeys!.markedHouseState!.tr), _buildItem('images/mine/icon_mine_highFunctionContent_fkgj.png', diff --git a/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart b/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart index 1462f56e..8f31651c 100755 --- a/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart +++ b/lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart @@ -57,10 +57,7 @@ class _ValueAddedServicesPageListState Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage, arguments: {'type': 2}); }), - _valueAddedServicesItem( - Image.asset( - 'images/mine/icon_mine_valueAddedServices_realName.png'), - TranslationLoader.lanKeys!.realNameAuthentication!.tr, () { + _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_realName.png'), '实名认证'.tr, () { Get.toNamed(Routers.valueAddedServicesRealNamePage); }), _valueAddedServicesItem( diff --git a/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_page.dart b/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_page.dart index 03a2fc38..d77af580 100755 --- a/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_page.dart +++ b/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_page.dart @@ -83,7 +83,7 @@ class _NewSMSTemplatePageState extends State { isHaveRightWidget: true, rightWidget: getTFWidget( state.templateNameTf, - TranslationLoader.lanKeys!.pleaseEnter!.tr, + '请输入'.tr, ), ), Obx(() => state.isUpdate.value == false @@ -284,7 +284,7 @@ class _NewSMSTemplatePageState extends State { normalIndex: 0, title: TranslationLoader.lanKeys!.type!.tr, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, - sureTitle: TranslationLoader.lanKeys!.sure!.tr, + sureTitle: '确定'.tr, data: titleList, clickCallBack: (int index, Object str) { state.selectedTemplateIndex.value = index; @@ -307,7 +307,7 @@ class _NewSMSTemplatePageState extends State { normalIndex: 0, title: TranslationLoader.lanKeys!.type!.tr, cancelTitle: TranslationLoader.lanKeys!.cancel!.tr, - sureTitle: TranslationLoader.lanKeys!.sure!.tr, + sureTitle: '确定'.tr, data: langNames, clickCallBack: (int index, Object str) { state.selectedLangIndex.value = index; diff --git a/lib/tools/seletKeyCyclicDate/seletKeyCyclicDate_page.dart b/lib/tools/seletKeyCyclicDate/seletKeyCyclicDate_page.dart index 0600fc56..4c5b51e3 100755 --- a/lib/tools/seletKeyCyclicDate/seletKeyCyclicDate_page.dart +++ b/lib/tools/seletKeyCyclicDate/seletKeyCyclicDate_page.dart @@ -142,28 +142,28 @@ class _SeletKeyCyclicDatePageState extends State { String dateStr; switch (index) { case 1: - dateStr = TranslationLoader.lanKeys!.mondayShort!.tr; + dateStr = '简写周一'.tr; break; case 2: - dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr; + dateStr = '简写周二'.tr; break; case 3: - dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr; + dateStr = '简写周三'.tr; break; case 4: - dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr; + dateStr = '简写周四'.tr; break; case 5: - dateStr = TranslationLoader.lanKeys!.fridayShort!.tr; + dateStr = '简写周五'.tr; break; case 6: - dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr; + dateStr = '简写周六'.tr; break; case 7: - dateStr = TranslationLoader.lanKeys!.sundayShort!.tr; + dateStr = '简写周日'.tr; break; default: - dateStr = ""; + dateStr = ''; break; } return GestureDetector( diff --git a/lib/tools/showIosTipView.dart b/lib/tools/showIosTipView.dart index 2a5996b0..23d84f4f 100755 --- a/lib/tools/showIosTipView.dart +++ b/lib/tools/showIosTipView.dart @@ -34,7 +34,7 @@ class ShowIosTipView extends StatelessWidget { }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () { if (sureClick != null) { sureClick!(); diff --git a/lib/tools/showSeletDateTime.dart b/lib/tools/showSeletDateTime.dart index f7b8c5c5..ddfd0ded 100755 --- a/lib/tools/showSeletDateTime.dart +++ b/lib/tools/showSeletDateTime.dart @@ -23,7 +23,7 @@ class ShowSelectDateTime { pickerTheme: DateTimePickerTheme( cancel: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black)), showTitle: true, - confirm: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.black)), + confirm: Text('确定'.tr, style: const TextStyle(color: Colors.black)), ), minDateTime: DateTime.parse(minT), maxDateTime: DateTime.parse(maxT), diff --git a/lib/tools/showTFView.dart b/lib/tools/showTFView.dart index af39f5f9..eb71a4f2 100755 --- a/lib/tools/showTFView.dart +++ b/lib/tools/showTFView.dart @@ -62,7 +62,7 @@ class ShowTFView extends StatelessWidget { keyboardType: keyboardType, decoration: InputDecoration( contentPadding: EdgeInsets.only(left: 5, top: isShowSuffixIcon??false ? 0 : -8, bottom: 6), - hintText: tipTitle??TranslationLoader.lanKeys!.pleaseEnter!.tr, + hintText: tipTitle??'请输入'.tr, hintStyle: TextStyle(fontSize: 22.sp, height: 1.0), //不需要输入框下划线 border: InputBorder.none, @@ -87,7 +87,7 @@ class ShowTFView extends StatelessWidget { }, ), CupertinoDialogAction( - child: Text(rightBtnTitle ?? TranslationLoader.lanKeys!.sure!.tr, + child: Text(rightBtnTitle ?? '确定'.tr, style: TextStyle(color: AppColors.mainColor)), onPressed: () { if (sureClick != null) { diff --git a/lib/tools/showTipView.dart b/lib/tools/showTipView.dart index 9e63c642..bb072886 100755 --- a/lib/tools/showTipView.dart +++ b/lib/tools/showTipView.dart @@ -23,7 +23,7 @@ class ShowTipView { content: Text(contentStr), actions: [ CupertinoDialogAction( - child: Text(sureStr ?? TranslationLoader.lanKeys!.sure!.tr, + child: Text(sureStr ?? '确定'.tr, style: TextStyle(color: AppColors.mainColor)), onPressed: Get.back, ), @@ -57,7 +57,7 @@ class ShowTipView { onPressed: Get.back, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () { Get.back(); blockIsHaveAllDataCallback(selet); diff --git a/lib/translations/lanKeyEntity.dart b/lib/translations/lanKeyEntity.dart index 0d83267c..bddaedf2 100755 --- a/lib/translations/lanKeyEntity.dart +++ b/lib/translations/lanKeyEntity.dart @@ -10,72 +10,73 @@ class LanKeyEntity { // this.remoteControl, // this.face, // this.operatingRecord, + // this.doorLockLog, + // this.number, + // this.additive, + // this.addTime, + // this.reset, + // this.sendKey, + // this.timeLimit, + // this.permanent, + // this.once, + // this.circulation, + // this.receiver, + // this.pleaseEnterNumberOrEmail, + // this.name, + // this.enterYourName, + // this.effectiveTime, + // this.failureTime, + // this.effectiveDate, + // this.failureDate, - this.doorLockLog, - this.number, - this.additive, - this.addTime, - this.reset, - this.sendKey, - this.timeLimit, - this.permanent, - this.once, - this.circulation, - this.receiver, - this.pleaseEnterNumberOrEmail, - this.name, - this.enterYourName, - this.effectiveTime, - this.failureTime, - this.effectiveDate, - this.failureDate, - this.monday, - this.tuesday, - this.wednesday, - this.thursday, - this.friday, - this.saturday, - this.sunday, - this.mondayShort, - this.tuesdayShort, - this.wednesdayShort, - this.thursdayShort, - this.fridayShort, - this.saturdayShort, - this.sundayShort, - this.realNameAuthentication, - this.sendKeyBottomTip, - this.send, - this.periodValidity, - this.sendGroupKey, - this.lock, - this.pleaseAdd, - this.pleaseSelect, - this.remoteUnlockingAllowed, - this.pleaseEnter, - this.getPassword, - this.custom, - this.clearAll, - this.recursiveDevice, - this.pleaseNameYourPassword, - this.pleaseEnterDigitsNumber, - this.getPasswordTip1, - this.getPasswordTip2, - this.getPasswordTip3, - this.getPasswordTip4, - this.getPasswordTip5, - this.getPasswordTip6, - this.getTip, - this.addTip, - this.sender, - this.senderTime, - this.keyDetail, - this.detail, - this.delete, - this.passwordDetail, - this.share, - this.amend, - this.sure, + // this.monday, + // this.tuesday, + // this.wednesday, + // this.thursday, + // this.friday, + // this.saturday, + // this.sunday, + // this.mondayShort, + // this.tuesdayShort, + // this.wednesdayShort, + // this.thursdayShort, + // this.fridayShort, + // this.saturdayShort, + // this.sundayShort, + + // this.realNameAuthentication, + // this.sendKeyBottomTip, + // this.send, + // this.periodValidity, + // this.sendGroupKey, + // this.lock, + // this.pleaseAdd, + // this.pleaseSelect, + // this.remoteUnlockingAllowed, + // this.pleaseEnter, + // this.getPassword, + // this.custom, + // this.clearAll, + // this.recursiveDevice, + // this.pleaseNameYourPassword, + // this.pleaseEnterDigitsNumber, + // this.getPasswordTip1, + // this.getPasswordTip2, + // this.getPasswordTip3, + // this.getPasswordTip4, + // this.getPasswordTip5, + // this.getPasswordTip6, + // this.getTip, + // this.addTip, + // this.sender, + // this.senderTime, + // this.keyDetail, + // this.detail, + // this.delete, + // this.passwordDetail, + // this.share, + // this.amend, + // this.sure, this.cancel, this.add, this.accountNumber, @@ -468,74 +469,74 @@ class LanKeyEntity { // remoteControl = json['remoteControl']; // face = json['face']; // operatingRecord = json['operatingRecord']; + // doorLockLog = json['doorLockLog']; + // number = json['number']; + // additive = json['additive']; + // addTime = json['addTime']; + // reset = json['reset']; + // sendKey = json['sendKey']; + // timeLimit = json['timeLimit']; + // permanent = json['permanent']; + // once = json['once']; + // circulation = json['circulation']; + // receiver = json['receiver']; + // pleaseEnterNumberOrEmail = json['pleaseEnterNumberOrEmail']; + // name = json['name']; + // enterYourName = json['enterYourName']; + // effectiveTime = json['effectiveTime']; - doorLockLog = json['doorLockLog']; - number = json['number']; - additive = json['additive']; - addTime = json['addTime']; + // failureTime = json['failureTime']; + // effectiveDate = json['effectiveDate']; + // failureDate = json['failureDate']; + // monday = json['monday']; + // tuesday = json['tuesday']; + // wednesday = json['wednesday']; + // thursday = json['thursday']; + // friday = json['friday']; + // saturday = json['saturday']; + // sunday = json['sunday']; - reset = json['reset']; - sendKey = json['sendKey']; - timeLimit = json['timeLimit']; - permanent = json['permanent']; - once = json['once']; - circulation = json['circulation']; - receiver = json['receiver']; - pleaseEnterNumberOrEmail = json['pleaseEnterNumberOrEmail']; - name = json['name']; - enterYourName = json['enterYourName']; - effectiveTime = json['effectiveTime']; - failureTime = json['failureTime']; - effectiveDate = json['effectiveDate']; - failureDate = json['failureDate']; - monday = json['monday']; - tuesday = json['tuesday']; - wednesday = json['wednesday']; - thursday = json['thursday']; - friday = json['friday']; - saturday = json['saturday']; - sunday = json['sunday']; - mondayShort = json['mondayShort']; - tuesdayShort = json['tuesdayShort']; - wednesdayShort = json['wednesdayShort']; - thursdayShort = json['thursdayShort']; - fridayShort = json['fridayShort']; - saturdayShort = json['saturdayShort']; - sundayShort = json['sundayShort']; + // mondayShort = json['mondayShort']; + // tuesdayShort = json['tuesdayShort']; + // wednesdayShort = json['wednesdayShort']; + // thursdayShort = json['thursdayShort']; + // fridayShort = json['fridayShort']; + // saturdayShort = json['saturdayShort']; + // sundayShort = json['sundayShort']; - realNameAuthentication = json['realNameAuthentication']; - sendKeyBottomTip = json['sendKeyBottomTip']; - send = json['send']; - periodValidity = json['periodValidity']; - sendGroupKey = json['sendGroupKey']; - lock = json['lock']; - pleaseAdd = json['pleaseAdd']; - pleaseSelect = json['pleaseSelect']; - remoteUnlockingAllowed = json['remoteUnlockingAllowed']; - pleaseEnter = json['pleaseEnter']; - getPassword = json['getPassword']; - custom = json['custom']; - clearAll = json['clearAll']; - recursiveDevice = json['recursiveDevice']; - pleaseNameYourPassword = json['pleaseNameYourPassword']; - pleaseEnterDigitsNumber = json['pleaseEnterDigitsNumber']; - getPasswordTip1 = json['getPasswordTip1']; - getPasswordTip2 = json['getPasswordTip2']; - getPasswordTip3 = json['getPasswordTip3']; - getPasswordTip4 = json['getPasswordTip4']; - getPasswordTip5 = json['getPasswordTip5']; - getPasswordTip6 = json['getPasswordTip6']; - getTip = json['getTip']; - addTip = json['addTip']; - sender = json['sender']; - senderTime = json['senderTime']; - keyDetail = json['keyDetail']; - detail = json['detail']; - delete = json['delete']; - passwordDetail = json['passwordDetail']; - share = json['share']; - amend = json['amend']; - sure = json['sure']; + // realNameAuthentication = json['realNameAuthentication']; + // sendKeyBottomTip = json['sendKeyBottomTip']; + // send = json['send']; + // periodValidity = json['periodValidity']; + // sendGroupKey = json['sendGroupKey']; + // lock = json['lock']; + // pleaseAdd = json['pleaseAdd']; + // pleaseSelect = json['pleaseSelect']; + // remoteUnlockingAllowed = json['remoteUnlockingAllowed']; + // pleaseEnter = json['pleaseEnter']; + // getPassword = json['getPassword']; + // custom = json['custom']; + // clearAll = json['clearAll']; + // recursiveDevice = json['recursiveDevice']; + // pleaseNameYourPassword = json['pleaseNameYourPassword']; + // pleaseEnterDigitsNumber = json['pleaseEnterDigitsNumber']; + // getPasswordTip1 = json['getPasswordTip1']; + // getPasswordTip2 = json['getPasswordTip2']; + // getPasswordTip3 = json['getPasswordTip3']; + // getPasswordTip4 = json['getPasswordTip4']; + // getPasswordTip5 = json['getPasswordTip5']; + // getPasswordTip6 = json['getPasswordTip6']; + // getTip = json['getTip']; + // addTip = json['addTip']; + // sender = json['sender']; + // senderTime = json['senderTime']; + // keyDetail = json['keyDetail']; + // detail = json['detail']; + // delete = json['delete']; + // passwordDetail = json['passwordDetail']; + // share = json['share']; + // amend = json['amend']; + // sure = json['sure']; cancel = json['cancel']; add = json['add']; accountNumber = json['accountNumber']; @@ -977,74 +978,74 @@ class LanKeyEntity { // String? remoteControl; // String? face; // String? operatingRecord; + // String? doorLockLog; + // String? number; + // String? additive; + // String? addTime; + // String? reset; + // String? sendKey; + // String? timeLimit; + // String? permanent; + // String? once; + // String? circulation; + // String? receiver; + // String? pleaseEnterNumberOrEmail; + // String? name; + // String? enterYourName; - String? doorLockLog; - String? number; - String? additive; - String? addTime; + // String? effectiveTime; + // String? failureTime; + // String? effectiveDate; + // String? failureDate; + // String? monday; + // String? tuesday; + // String? wednesday; + // String? thursday; + // String? friday; + // String? saturday; + // String? sunday; - String? reset; - String? sendKey; - String? timeLimit; - String? permanent; - String? once; - String? circulation; - String? receiver; - String? pleaseEnterNumberOrEmail; - String? name; - String? enterYourName; - String? effectiveTime; - String? failureTime; - String? effectiveDate; - String? failureDate; - String? monday; - String? tuesday; - String? wednesday; - String? thursday; - String? friday; - String? saturday; - String? sunday; - String? mondayShort; - String? tuesdayShort; - String? wednesdayShort; - String? thursdayShort; - String? fridayShort; - String? saturdayShort; - String? sundayShort; + // String? mondayShort; + // String? tuesdayShort; + // String? wednesdayShort; + // String? thursdayShort; + // String? fridayShort; + // String? saturdayShort; + // String? sundayShort; - String? realNameAuthentication; - String? sendKeyBottomTip; - String? send; - String? periodValidity; - String? sendGroupKey; - String? lock; - String? pleaseAdd; - String? pleaseSelect; - String? remoteUnlockingAllowed; - String? pleaseEnter; - String? getPassword; - String? custom; - String? clearAll; - String? recursiveDevice; - String? pleaseNameYourPassword; - String? pleaseEnterDigitsNumber; - String? getPasswordTip1; - String? getPasswordTip2; - String? getPasswordTip3; - String? getPasswordTip4; - String? getPasswordTip5; - String? getPasswordTip6; - String? getTip; - String? addTip; - String? sender; - String? senderTime; - String? keyDetail; - String? detail; - String? delete; - String? passwordDetail; - String? share; - String? amend; - String? sure; + // String? realNameAuthentication; + // String? sendKeyBottomTip; + // String? send; + // String? periodValidity; + // String? sendGroupKey; + // String? lock; + // String? pleaseAdd; + // String? pleaseSelect; + // String? remoteUnlockingAllowed; + // String? pleaseEnter; + // String? getPassword; + // String? custom; + // String? clearAll; + // String? recursiveDevice; + // String? pleaseNameYourPassword; + // String? pleaseEnterDigitsNumber; + // String? getPasswordTip1; + // String? getPasswordTip2; + // String? getPasswordTip3; + // String? getPasswordTip4; + // String? getPasswordTip5; + // String? getPasswordTip6; + // String? getTip; + // String? addTip; + // String? sender; + // String? senderTime; + // String? keyDetail; + // String? detail; + // String? delete; + // String? passwordDetail; + // String? share; + // String? amend; + // String? sure; String? cancel; String? add; String? accountNumber; @@ -1474,75 +1475,75 @@ class LanKeyEntity { // map['remoteControl'] = remoteControl; // map['face'] = face; // map['operatingRecord'] = operatingRecord; + // map['doorLockLog'] = doorLockLog; + // map['number'] = number; + // map['additive'] = additive; + // map['addTime'] = addTime; + // map['reset'] = reset; + // map['sendKey'] = sendKey; + // map['timeLimit'] = timeLimit; + // map['permanent'] = permanent; + // map['once'] = once; + // map['circulation'] = circulation; + // map['receiver'] = receiver; + // map['pleaseEnterNumberOrEmail'] = pleaseEnterNumberOrEmail; + // map['name'] = name; + // map['enterYourName'] = enterYourName; - map['doorLockLog'] = doorLockLog; - map['number'] = number; - map['additive'] = additive; - map['addTime'] = addTime; + // map['effectiveTime'] = effectiveTime; + // map['failureTime'] = failureTime; + // map['effectiveDate'] = effectiveDate; + // map['failureDate'] = failureDate; + // map['monday'] = monday; + // map['tuesday'] = tuesday; + // map['wednesday'] = wednesday; + // map['thursday'] = thursday; + // map['friday'] = friday; + // map['saturday'] = saturday; + // map['sunday'] = sunday; - map['reset'] = reset; - map['sendKey'] = sendKey; - map['timeLimit'] = timeLimit; - map['permanent'] = permanent; - map['once'] = once; - map['circulation'] = circulation; - map['receiver'] = receiver; - map['pleaseEnterNumberOrEmail'] = pleaseEnterNumberOrEmail; - map['name'] = name; - map['enterYourName'] = enterYourName; - map['effectiveTime'] = effectiveTime; - map['failureTime'] = failureTime; - map['effectiveDate'] = effectiveDate; - map['failureDate'] = failureDate; - map['monday'] = monday; - map['tuesday'] = tuesday; - map['wednesday'] = wednesday; - map['thursday'] = thursday; - map['friday'] = friday; - map['saturday'] = saturday; - map['sunday'] = sunday; - map['mondayShort'] = mondayShort; - map['tuesdayShort'] = tuesdayShort; - map['wednesdayShort'] = wednesdayShort; - map['thursdayShort'] = thursdayShort; - map['fridayShort'] = fridayShort; - map['saturdayShort'] = saturdayShort; - map['sundayShort'] = sundayShort; + // map['mondayShort'] = mondayShort; + // map['tuesdayShort'] = tuesdayShort; + // map['wednesdayShort'] = wednesdayShort; + // map['thursdayShort'] = thursdayShort; + // map['fridayShort'] = fridayShort; + // map['saturdayShort'] = saturdayShort; + // map['sundayShort'] = sundayShort; - map['realNameAuthentication'] = realNameAuthentication; - map['sendKeyBottomTip'] = sendKeyBottomTip; - map['send'] = send; - map['periodValidity'] = periodValidity; - map['sendGroupKey'] = sendGroupKey; - map['lock'] = lock; - map['pleaseAdd'] = pleaseAdd; - map['pleaseSelect'] = pleaseSelect; - map['remoteUnlockingAllowed'] = remoteUnlockingAllowed; - map['pleaseEnter'] = pleaseEnter; - map['getPassword'] = getPassword; + // map['realNameAuthentication'] = realNameAuthentication; + // map['sendKeyBottomTip'] = sendKeyBottomTip; + // map['send'] = send; + // map['periodValidity'] = periodValidity; + // map['sendGroupKey'] = sendGroupKey; + // map['lock'] = lock; + // map['pleaseAdd'] = pleaseAdd; + // map['pleaseSelect'] = pleaseSelect; + // map['remoteUnlockingAllowed'] = remoteUnlockingAllowed; + // map['pleaseEnter'] = pleaseEnter; + // map['getPassword'] = getPassword; - map['custom'] = custom; - map['clearAll'] = clearAll; - map['recursiveDevice'] = recursiveDevice; - map['pleaseNameYourPassword'] = pleaseNameYourPassword; - map['pleaseEnterDigitsNumber'] = pleaseEnterDigitsNumber; - map['getPasswordTip1'] = getPasswordTip1; - map['getPasswordTip2'] = getPasswordTip2; - map['getPasswordTip3'] = getPasswordTip3; - map['getPasswordTip4'] = getPasswordTip4; - map['getPasswordTip5'] = getPasswordTip5; - map['getPasswordTip6'] = getPasswordTip6; - map['getTip'] = getTip; - map['addTip'] = addTip; - map['sender'] = sender; - map['senderTime'] = senderTime; - map['keyDetail'] = keyDetail; - map['detail'] = detail; - map['delete'] = delete; - map['passwordDetail'] = passwordDetail; - map['share'] = share; - map['amend'] = amend; - map['sure'] = sure; + // map['custom'] = custom; + // map['clearAll'] = clearAll; + // map['recursiveDevice'] = recursiveDevice; + // map['pleaseNameYourPassword'] = pleaseNameYourPassword; + // map['pleaseEnterDigitsNumber'] = pleaseEnterDigitsNumber; + // map['getPasswordTip1'] = getPasswordTip1; + // map['getPasswordTip2'] = getPasswordTip2; + // map['getPasswordTip3'] = getPasswordTip3; + // map['getPasswordTip4'] = getPasswordTip4; + // map['getPasswordTip5'] = getPasswordTip5; + // map['getPasswordTip6'] = getPasswordTip6; + // map['getTip'] = getTip; + // map['addTip'] = addTip; + // map['sender'] = sender; + // map['senderTime'] = senderTime; + // map['keyDetail'] = keyDetail; + // map['detail'] = detail; + // map['delete'] = delete; + // map['passwordDetail'] = passwordDetail; + // map['share'] = share; + // map['amend'] = amend; + // map['sure'] = sure; map['cancel'] = cancel; map['add'] = add; map['accountNumber'] = accountNumber; diff --git a/lib/versionUndate/versionUndateTool.dart b/lib/versionUndate/versionUndateTool.dart index 5db4fb1a..9ec8a5ae 100755 --- a/lib/versionUndate/versionUndateTool.dart +++ b/lib/versionUndate/versionUndateTool.dart @@ -108,7 +108,7 @@ class VersionUndateTool { }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () async { if (await canLaunchUrl(Uri.parse( versionUndateEntity.data!.appDownloadUrl!))) { @@ -122,7 +122,7 @@ class VersionUndateTool { ] : [ CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.sure!.tr), + child: Text('确定'.tr), onPressed: () async { if (await canLaunchUrl(Uri.parse( versionUndateEntity.data!.appDownloadUrl!))) {