fix:修复部分国际化bug

This commit is contained in:
liyi 2024-11-26 11:14:48 +08:00
parent 4730b0ebc9
commit 860016cbf8
4 changed files with 96 additions and 97 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Star Lock</string>
<string name="app_name">TTLock Pro</string>
</resources>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name"></string>
<string name="app_name">通通</string>
</resources>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">星锁</string>
<string name="app_name"></string>
</resources>

View File

@ -748,109 +748,108 @@ class _LockDetailPageState extends State<LockDetailPage>
Widget adminInfoView(
{bool center = true, bool max = true, bool add = false}) {
return Expanded(
child: Wrap(
children: <Widget>[
Row(
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
children: [
Image.asset(
'images/icon_electronicKey_admin.png',
return Row(
mainAxisAlignment:
center ? MainAxisAlignment.center : MainAxisAlignment.start,
children: <Widget>[
Row(
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
children: [
Image.asset(
'images/icon_electronicKey_admin.png',
width: 24.w,
height: 20.w,
color: AppColors.blackColor, //
),
SizedBox(width: 6.w),
Text(
state.keyInfos.value.isLockOwner == 1
? '超级管理员'.tr
: (state.keyInfos.value.keyRight == 1
? '授权管理员'.tr
: '普通用户'.tr),
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
),
if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w),
],
),
Row(
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
children: [
FlavorsImg(
child: Image.asset(
state.keyInfos.value.hasGateway == 1
? 'images/main/icon_main_remoteUnlocking.png'
: 'images/main/icon_main_remoteUnlocking_grey.png',
width: 24.w,
height: 20.w,
color: AppColors.blackColor, //
),
SizedBox(width: 6.w),
Text(
state.keyInfos.value.isLockOwner == 1
? '超级管理员'.tr
: (state.keyInfos.value.keyRight == 1
? '授权管理员'.tr
: '普通用户'.tr),
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
),
if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w),
],
),
Row(
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
children: [
FlavorsImg(
child: Image.asset(
state.keyInfos.value.hasGateway == 1
? 'images/main/icon_main_remoteUnlocking.png'
: 'images/main/icon_main_remoteUnlocking_grey.png',
),
SizedBox(width: 6.w),
Text(
'网关设备'.tr,
style: TextStyle(
fontSize: 20.sp,
color: state.keyInfos.value.hasGateway == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),
if (add) SizedBox(width: 20.w) else SizedBox(width: 20.w),
],
),
Row(
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
children: [
FlavorsImg(
child: Image.asset('images/main/icon_lockDetail_needNetwork.png',
width: 24.w,
height: 20.w,
),
),
SizedBox(width: 6.w),
Text(
'网关设备'.tr,
style: TextStyle(
fontSize: 20.sp,
color: state.keyInfos.value.hasGateway == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),
if (add) SizedBox(width: 20.w) else SizedBox(width: 20.w),
],
),
Row(
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
children: [
FlavorsImg(
child: Image.asset(
'images/main/icon_lockDetail_needNetwork.png',
width: 24.w,
height: 20.w,
color: state.isOpenLockNeedOnline.value == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),
SizedBox(width: 6.w),
Text(
'手机需联网'.tr,
style: TextStyle(
fontSize: 20.sp,
color: state.isOpenLockNeedOnline.value == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),
if (add) ...<Widget>[
const Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(Routers.selectLockTypePage);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FlavorsImg(
child: Image.asset(
'images/mine/icon_mine_main_addLock.png',
width: 24.w,
height: 20.w,
),
color: state.isOpenLockNeedOnline.value == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),
SizedBox(width: 6.w),
Text(
'手机需联网'.tr,
style: TextStyle(
fontSize: 20.sp,
color: state.isOpenLockNeedOnline.value == 1
? AppColors.mainColor
: AppColors.btnDisableColor),
),
if (add) ...<Widget>[
const Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(Routers.selectLockTypePage);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FlavorsImg(
child: Image.asset(
'images/mine/icon_mine_main_addLock.png',
width: 24.w,
height: 20.w,
),
Text(
'添加设备'.tr,
style: TextStyle(
fontSize: 20.sp,
color: AppColors.darkGrayTextColor),
)
],
),
),
Text(
'添加设备'.tr,
style: TextStyle(
fontSize: 20.sp,
color: AppColors.darkGrayTextColor),
)
],
),
),
],
),
],
)
],
),
],
)
],
);
}