修复国际化bug

This commit is contained in:
魏少阳 2024-10-19 09:38:57 +08:00
parent 15af50d951
commit 6eeb2e9fe3
25 changed files with 257 additions and 250 deletions

View File

@ -41,7 +41,7 @@
"周六": "Sat",
"周日": "Sun",
"群发钥匙": "Send multiple ekeys",
"锁": "Lock",
"锁": "Locks",
"请添加": "Recipient",
"允许远程开锁": "Remote Unlock",
"请输入验证码": "Verification Code",
@ -324,7 +324,7 @@
"电机功率设置": "MotorPower Setting",
"开锁时是否需联网": "If Internet Is Required When Unlocking",
"选择要加入分组的锁": "Select lockS to add to this group",
"锁数量": "Lock Count",
"锁数量": "Lock amount",
"小米IOT平台": "Xiaomi IOT Platform",
"面容开锁设置": "Face Unlocks Set",
"感应距离": "Sensing distance",
@ -346,8 +346,8 @@
"录像时段": "Video slot",
"密码": "Passcodes",
"卡": "Cards",
"指纹": "Fingerprint",
"人脸": "Face",
"指纹": "Fingerprints",
"人脸": "Faces",
"配件商城": "Lock Mall",
"公司名称": "Company Name",
"请输入公司名字": "Enter Company Name",
@ -394,8 +394,8 @@
"重置成功": "Reset success",
"确定要退出吗?": "Exit?",
"功能暂未开放": "Function is not yet open",
"设置成功": "Set up successfully",
"删除成功": "Delete successfully",
"设置成功": "Set up successful",
"删除成功": "Delete successful",
"单次": "One-time",
"永久": "Permanent",
"限时": "Timed",
@ -410,17 +410,17 @@
"已过期": "Invalid",
"该锁的电子钥匙都将被删除": "All eKeys for this Lock will be DELETED",
"同时删除其发送的所有钥匙,钥匙删除后不能恢复": "DELETE All ekeys associated with this ekey.This Step cannot be UNDONE!",
"删除钥匙会在用户APP连网后生效": "The ekey will be DELETED",
"删除钥匙会在用户APP连网后生效": "The eKey will be DELETED when the User's APP connects to a Network",
"有效时间": "Effective time",
"接收者": "Recipient",
"仅管理自己创建的用户": "Manage his own users only",
"远程开锁": "Remote unlock",
"请输入钥匙名称": "Please enter the key name",
"修改成功": "Modify success",
"修改成功": "Modify successful",
"冻结": "Freeze",
"解除冻结": "Thaw",
"授权": "Authorize",
"取消授权": "De-Authorize",
"取消授权": "De-authorize",
"同时解冻其发送的钥匙": "Thaw all ekeys issued by this user",
"会在用户APP连网后生效": "This ekey will be THAWED when the User's APP connects to a Network",
"同时冻结其发送的钥匙": "Freeze all ekeys issued by this user",
@ -446,7 +446,7 @@
"请选择开始时间": "Please select the start time",
"选择用户": "Select recipients",
"已选中": "Selected",
"确定": "OK",
"确定": "Sure",
"请选择要发送的锁": "Please select locks",
"人脸实名认证指的是用户在使用手机APP开锁时需要先进行本人人脸验证验证通过才能开锁。": "Face real-name authentication refers to the user's need to verify his face before unlocking the phone APP, and the verification can be unlocked.",
"分享": "Share",
@ -482,7 +482,7 @@
"开始添加": "Start",
"请将您的手指按下": "Place your Finger on the Sensor",
"根据提示,抬起手指后再进行下一次指纹采集": "Follow the prompts...You will be required to Remove and Place your Finger to the Sensor for Next Record",
"添加成功": "Add success",
"添加成功": "Add successful",
"更新成功": "Update success",
"搜索": "Search",
"重置后,该锁的卡都将被删除哦,确认要重置吗?": "After resetting, the card of the lock will be deleted, do you want to reset?",
@ -509,7 +509,7 @@
"您的钥匙已过期": "Your key has expired",
"常开模式开启": "The lock is in Passage Mode",
"超级管理员": "Super admin",
"授权管理员": "Authorized admin",
"授权管理员": "Make admin",
"普通用户": "Ordinary user",
"余": "Balance",
"天": "Day",
@ -556,7 +556,7 @@
"网络摄像头": "Camera",
"重命名": "Rename",
"分组下的锁将被移到未分组里": "Locks under the group will be moved to ungrouped",
"编辑成功": "Edit success",
"编辑成功": "Edit successful",
"厂商": "Manufacturer",
"型号": "Model",
"密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。": "After the password is generated, please use it once for activation before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. After the password is activated, it can be used unlimited times within the validity period.",
@ -1084,5 +1084,9 @@
"丹麦语": "Danish",
"重置后,该锁的掌静脉都将被删除哦,确认要重置吗?": "After reset, the metacarpal veins of the lock will be deleted. Are you sure you want to reset?",
"在线": "Online",
"离线": "Offline"
"离线": "Offline",
"购买记录": "Purchase record",
"使用记录": "User Record",
"失效时间要大于当前时间": "The expiration time must be longer than the current time"
}

View File

@ -1084,5 +1084,9 @@
"丹麦语": "丹麦语",
"重置后,该锁的掌静脉都将被删除哦,确认要重置吗?": "重置后,该锁的掌静脉都将被删除哦,确认要重置吗?",
"在线": "在线",
"离线": "离线"
"离线": "离线",
"购买记录": "购买记录",
"使用记录": "使用记录",
"失效时间要大于当前时间": "失效时间要大于当前时间"
}

View File

@ -1084,5 +1084,9 @@
"丹麦语": "丹麦语",
"重置后,该锁的掌静脉都将被删除哦,确认要重置吗?": "重置后,该锁的掌静脉都将被删除哦,确认要重置吗?",
"在线": "在线",
"离线": "离线"
"离线": "离线",
"购买记录": "购买记录",
"使用记录": "使用记录",
"失效时间要大于当前时间": "失效时间要大于当前时间"
}

View File

@ -1,15 +1,14 @@
import 'dart:convert';
import 'package:crypto/crypto.dart' as crypto;
import 'package:star_lock/tools/dateTool.dart';
import '../../app_settings/app_settings.dart';
import '../io_tool/io_tool.dart';
import '../sm4Encipher/sm4.dart';
import '../io_reply.dart';
import '../io_sender.dart';
import '../io_tool/io_tool.dart';
import '../io_type.dart';
import 'package:crypto/crypto.dart' as crypto;
import '../sm4Encipher/sm4.dart';
///
/*

View File

@ -1,15 +1,12 @@
import 'dart:convert';
import 'package:get/get.dart';
import 'package:crypto/crypto.dart' as crypto;
import '../../app_settings/app_settings.dart';
import '../io_reply.dart';
import '../io_sender.dart';
import '../io_tool/io_tool.dart';
import '../io_type.dart';
import 'package:crypto/crypto.dart' as crypto;
import '../sm4Encipher/sm4.dart';
/// ()/

View File

@ -205,7 +205,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
padding: EdgeInsets.only(top: 20.h, bottom: 20.h),
child: Row(
children: <Widget>[
SizedBox(width: 30.w),
SizedBox(width: 20.w),
SizedBox(
width: 60.w,
height: 60.w,
@ -214,36 +214,31 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
child: CustomNetworkImage(
url: avatarURL,
defaultUrl: 'images/controls_user.png',
width: 105.w,
height: 105.h,
width: 60.w,
height: 60.h,
),
),
),
SizedBox(width: 20.w),
Expanded(
SizedBox(
width: 1.sw - 120.w,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SizedBox(
width: 1.sw - 110.w - 100.w,
child: Row(
children: <Widget>[
Flexible(
child: Text(receiveUser,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor)),
),
],
),
),
SizedBox(width: 10.w),
Text(receiveUser,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor)),
const Spacer(),
Text(
keyStatus,
textAlign: TextAlign.end,
style: TextStyle(fontSize: 18.sp, color: Colors.red),
),
],
@ -260,11 +255,11 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
),
],
),
SizedBox(width: 20.h),
// SizedBox(width: 20.h),
],
),
),
SizedBox(width: 20.h),
// SizedBox(width: 20.h),
],
),
),

View File

@ -191,7 +191,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
}).then((Object? val) {
if (val == 'deletScuess') {
state.itemDataList.removeWhere(
( ElectronicKeyListItem item) =>
(ElectronicKeyListItem item) =>
item.keyId ==
indexEntity.keyId!);
setState(() {});
@ -261,7 +261,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
padding: EdgeInsets.only(top: 20.h, bottom: 20.h),
child: Row(
children: <Widget>[
SizedBox(width: 30.w),
SizedBox(width: 20.w),
SizedBox(
width: 60.w,
height: 60.w,
@ -270,56 +270,47 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
child: CustomNetworkImage(
url: avatarURL,
defaultUrl: 'images/controls_user.png',
width: 105.w,
height: 105.h,
width: 60.w,
height: 60.h,
),
),
),
SizedBox(width: 20.w),
Expanded(
SizedBox(
width: 1.sw - 120.w,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SizedBox(
width: 1.sw - 110.w - 34.w - 60.w,
child: Row(
children: <Widget>[
Flexible(
child: Text(receiveUser,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor)),
),
SizedBox(width: 5.w),
if (isRemteUnlocking)
Image.asset(
'images/icon_electronicKey_remteUnlocking.png',
width: 24.w,
height: 20.w,
)
else
Container(),
SizedBox(width: 5.w),
if (isAdminKey)
Image.asset(
'images/icon_electronicKey_admin.png',
width: 24.w,
height: 20.w,
)
else
Container(),
],
Text(receiveUser,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor)),
SizedBox(width: 5.w),
if (isRemteUnlocking)
Image.asset(
'images/icon_electronicKey_remteUnlocking.png',
width: 24.w,
height: 20.w,
),
SizedBox(width: 5.w),
if (isAdminKey)
Image.asset(
'images/icon_electronicKey_admin.png',
width: 24.w,
height: 20.w,
),
),
// Expanded(child: SizedBox(width: 20.w,)),
SizedBox(width: 10.w),
// SizedBox(width: 10.w),
const Spacer(),
Text(
keyStatus,
textAlign: TextAlign.end,
style: TextStyle(fontSize: 18.sp, color: Colors.red),
),
],
@ -340,7 +331,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
],
),
),
SizedBox(width: 20.h),
// SizedBox(width: 20.h),
],
),
),

View File

@ -44,11 +44,11 @@ class massSendLockGroupCell extends StatelessWidget {
child: Container(
height: 60.h,
color: Colors.white,
width: ScreenUtil().screenWidth,
width: 1.sw,
child: Row(
children: [
SizedBox(
width: 30.w,
width: 20.w,
),
Image.asset(
'images/mine/icon_mine_gatewaySignal_prompt.png',
@ -56,17 +56,21 @@ class massSendLockGroupCell extends StatelessWidget {
height: 36.w,
),
SizedBox(
width: 10.w,
),
Text(
itemData.lockAlias!,
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
width: 5.w,
),
Expanded(
child: SizedBox(
width: 20.w,
)),
child: Text(
itemData.lockAlias!,
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
overflow: TextOverflow.ellipsis,
),
),
SizedBox(width: 20.w),
// Expanded(
// child: SizedBox(
// width: 20.w,
// )),
Visibility(
visible: isShowBtn,
child: Image.asset(
@ -78,7 +82,7 @@ class massSendLockGroupCell extends StatelessWidget {
color: !isVip ? Colors.grey : AppColors.mainColor,
),),
SizedBox(
width: 30.w,
width: 20.w,
)
],
),

View File

@ -203,9 +203,10 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget, Au
],
),
Container(
// padding: EdgeInsets.all(30.w),
padding: EdgeInsets.only(left:30.w, right: 30.w),
child: Text(
'添加锁时,手机必须在锁旁边'.tr,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 26.sp,
// fontWeight: FontWeight.w800,

View File

@ -69,13 +69,12 @@ class AddAuthorizedAdministratorLogic extends BaseGetXController {
isOnlyManageSelf: state.onlyManageYouCreatesUser.value == true ? 1 : 2,
);
if (entity.errorCode!.codeIsSuccessful) {
state.isSendSuccess.value = true;
state.isCreateUser.value = false;
state.getKeyId.value = entity.data!.keyId ?? 0;
// Toast.show(msg: "添加成功");
eventBus.fire(AuthorizedAdministratorListPageRefreshUI());
Get.back();
} else {
// showToast("${entity.errorMsg}");
if (entity.errorCode == 425) {

View File

@ -54,9 +54,6 @@ class _AddAuthorizedAdministratorPageState
//
Widget _permanentAdministrator() {
if (state.isSendSuccess.value == true) {
return sendElectronicKeySucceed();
} else {
return Column(
children: [
keyInfoWidget(),
@ -109,14 +106,10 @@ class _AddAuthorizedAdministratorPageState
_buildSureBtn()
],
);
}
}
//
Widget _timeLimitAdministrator() {
if (state.isSendSuccess.value == true) {
return sendElectronicKeySucceed();
} else {
return Column(
children: [
keyInfoWidget(),
@ -169,7 +162,6 @@ class _AddAuthorizedAdministratorPageState
_buildSureBtn()
],
);
}
}
// widget
@ -477,7 +469,6 @@ class _AddAuthorizedAdministratorPageState
SubmitBtn(
btnName: '完成'.tr,
onClick: () {
state.isSendSuccess.value = false;
Navigator.pop(context, true);
}),
SizedBox(

View File

@ -27,7 +27,7 @@ class AddAuthorizedAdministratorState {
RxString countryName = '中国'.tr.obs;
RxString countryCode = '86'.obs;
RxBool isSendSuccess = false.obs;
// RxBool isSendSuccess = false.obs;
final RxBool isRemoteUnlock = false.obs; //
final RxBool isAuthentication = false.obs; //
final RxBool onlyManageYouCreatesUser = false.obs; //

View File

@ -123,18 +123,18 @@ class AdministratorDetailsLogic extends BaseGetXController {
return AlertBottomWidget(
topTitle: '',
items: textList,
chooseCallback: (value) {
chooseCallback: (int value) {
final int index = value;
if (index == 0) {
if (state.itemData.value.keyStatus == 110405) {
//
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog(
'同时解冻其发送的钥匙'.tr, (isAllData) {
'同时解冻其发送的钥匙'.tr + '?', (bool isAllData) {
cancelFreeze(isAllData ? 1 : 0);
});
} else {
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog(
'同时冻结其发送的钥匙'.tr, (isAllData) {
'同时冻结其发送的钥匙'.tr, (bool isAllData) {
freezeKey(isAllData ? 1 : 0);
});
}

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:get/get.dart';
@ -190,6 +191,7 @@ class _AuthorizedAdministratorListPageState
},
child: Container(
height: 100.h,
width: 1.sw,
color: Colors.white,
child: Row(
children: <Widget>[
@ -210,33 +212,29 @@ class _AuthorizedAdministratorListPageState
),
),
SizedBox(width: 20.w),
Expanded(
SizedBox(
width: 1.sw - 110.w,
// color: Colors.blue,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(
width: 1.sw - 110.w - 100.w,
child: Row(
children: <Widget>[
Flexible(
child: Text(itemData.name ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor)),
),
],
),
Expanded(
child: Text(itemData.name ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor)),
),
SizedBox(width: 10.w),
Text(
XSConstantMacro.getKeyStatusStr(itemData.keyStatus!),
style: TextStyle(fontSize: 18.sp, color: Colors.red),
),
SizedBox(width: 20.w)
],
),
SizedBox(height: 5.h),
@ -255,7 +253,7 @@ class _AuthorizedAdministratorListPageState
],
),
),
SizedBox(width: 20.h),
// SizedBox(width: 20.h),
],
),
),

View File

@ -18,7 +18,7 @@ class GroupEditLockLogic extends BaseGetXController {
var entity = await ApiRepository.to.lockGroupAddLock(
lockIds: lockIds, groupId: state.selectGroupListItem.keyGroupId!);
if (entity.errorCode!.codeIsSuccessful) {
showToast('添加成功', something: () {
showToast('添加成功'.tr, something: () {
eventBus.fire(LockGroupEditGroupLockRefreshEvent());
eventBus.fire(RefreshLockListInfoDataEvent());
Get.close(2);

View File

@ -2,6 +2,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList/lockGroupList_state.dart';
@ -11,7 +12,6 @@ import 'package:star_lock/tools/showTipView.dart';
import '../../../../../../appRouters.dart';
import '../../../../../../app_settings/app_colors.dart';
import '../../../../../../tools/titleAppBar.dart';
import '../../../../tools/left_slide/left_slide_actions.dart';
import '../../../../tools/noData.dart';
import 'lockGroupList_logic.dart';
@ -47,7 +47,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
ShowTipView().showTFViewAlertDialog(
state.changeNameController,
'创建新分组'.tr,
'请输入'.tr, () {
'请输入姓名'.tr, () {
//
if (state.changeNameController.text.isNotEmpty) {
Navigator.of(context).pop();
@ -79,66 +79,89 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
final GroupListItem itemData = state.itemDataList[i];
state.lockNum += itemData.lockList!.length;
}
return ListView.separated(
itemCount: state.itemDataList.length + 1,
itemBuilder: (BuildContext c, int index) {
if (index == state.itemDataList.length) {
return Center(
child: Column(
children: <Widget>[
SizedBox(
height: 20.h,
),
SizedBox(
height: 40.h,
child: Text(
'${'锁数量'.tr}${state.lockNum.toString()}',
style: TextStyle(
color: AppColors.darkGrayTextColor, fontSize: 20.sp),
return SlidableAutoCloseBehavior(
child: ListView.separated(
itemCount: state.itemDataList.length + 1,
itemBuilder: (BuildContext c, int index) {
if (index == state.itemDataList.length) {
return Center(
child: Column(
children: <Widget>[
SizedBox(
height: 20.h,
),
)
],
),
);
} else {
final GroupListItem itemData = state.itemDataList[index];
if (itemData.groupType == 0) {
state.ungrouped = itemData;
}
if (index < state.itemDataList.length) {
return LeftSlideActions(
tag: itemData.keyGroupId!.toString(),
key: Key(itemData.keyGroupId!.toString()),
actionsWidth: itemData.groupType != 0 ? 200.w : 0,
actions: itemData.groupType != 0
? <Widget>[
_buildEditBtn(itemData),
_buildDeleteBtn(itemData),
]
: <Widget>[],
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(1)),
SizedBox(
height: 40.h,
child: Text(
'${'锁数量'.tr}${state.lockNum.toString()}',
style: TextStyle(
color: AppColors.darkGrayTextColor, fontSize: 20.sp),
),
)
],
),
child: lockDataListItem(
'${itemData.keyGroupName}(${itemData.lockList?.length})',
() {
Get.toNamed(Routers.lockItemListPage,
arguments: <String, GroupListItem>{
'groupListItem': itemData,
'ungrouped': state.ungrouped
});
}),
);
} else {
final GroupListItem itemData = state.itemDataList[index];
if (itemData.groupType == 0) {
state.ungrouped = itemData;
}
if (index < state.itemDataList.length) {
return Slidable(
key: ValueKey(itemData.keyGroupId),
endActionPane: ActionPane(
extentRatio: 0.4,
motion: const ScrollMotion(),
children: <Widget>[
_buildEditBtn(itemData),
_buildDeleteBtn(itemData),
],
),
child: lockDataListItem(
'${itemData.keyGroupName}(${itemData.lockList?.length})',
() {
Get.toNamed(Routers.lockItemListPage,
arguments: <String, GroupListItem>{
'groupListItem': itemData,
'ungrouped': state.ungrouped
});
}),
);
// return LeftSlideActions(
// tag: itemData.keyGroupId!.toString(),
// key: Key(itemData.keyGroupId!.toString()),
// actionsWidth: itemData.groupType != 0 ? 200.w : 0,
// actions: itemData.groupType != 0
// ? <Widget>[
// _buildEditBtn(itemData),
// _buildDeleteBtn(itemData),
// ]
// : <Widget>[],
// decoration: const BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(1)),
// ),
// child: lockDataListItem(
// '${itemData.keyGroupName}(${itemData.lockList?.length})',
// () {
// Get.toNamed(Routers.lockItemListPage,
// arguments: <String, GroupListItem>{
// 'groupListItem': itemData,
// 'ungrouped': state.ungrouped
// });
// }),
// );
}
return const SizedBox.shrink();
}
return const SizedBox.shrink();
}
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
});
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
}),
);
}
Widget _buildDeleteBtn(GroupListItem groupListItem) {
@ -151,7 +174,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
});
},
child: Container(
width: 100.w,
width: 1.sw*0.2,
color: const Color(0xFFF20101),
alignment: Alignment.center,
child: Text(
@ -175,7 +198,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
// showCupertinoAlertDialog(context, false, groupListItem.keyGroupId!);
ShowTipView().showTFViewAlertDialog(state.changeNameController,
'修改名称'.tr, '请输入'.tr, () {
'修改名称'.tr, '请输入姓名'.tr, () {
if (state.changeNameController.text.isNotEmpty) {
Get.back();
logic.editLockGroupRequest(groupListItem.keyGroupId!);
@ -189,7 +212,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
}, isShowSuffixIcon: true);
},
child: Container(
width: 100.w,
width: 1.sw*0.2,
color: AppColors.mainColor,
alignment: Alignment.center,
child: Text(
@ -209,7 +232,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
return GestureDetector(
onTap: action,
child: Container(
// height: 70.h,
height: 70.h,
padding:
EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h),
decoration: BoxDecoration(

View File

@ -2,6 +2,7 @@
import 'dart:core';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
@ -52,6 +53,7 @@ class _ExpandedListTileState extends State<ExpandedListTile> {
Container(
color: Colors.white,
height: 80.h,
width: 1.sw,
child: Row(
children: _buildExpandRowList(),
),
@ -110,7 +112,7 @@ class _ExpandedListTileState extends State<ExpandedListTile> {
widgetList.add(GestureDetector(
child: Container(
width: ScreenUtil().screenWidth - (widget.isShowBtn ? 80.w : 0),
width: 1.sw - (widget.isShowBtn ? 80.w : 0),
color: Colors.white,
child: Row(
children: [
@ -122,14 +124,14 @@ class _ExpandedListTileState extends State<ExpandedListTile> {
SizedBox(
width: widget.isShowBtn ? 10.w :30.w,
),
Text(
widget.groupItem.keyGroupName ?? '',
style: TextStyle(color: AppColors.blackColor, fontSize: 22.sp),
),
Expanded(
child: SizedBox(
width: 10.w,
)),
child: Text(
widget.groupItem.keyGroupName ?? '',
style: TextStyle(color: AppColors.blackColor, fontSize: 22.sp),
overflow: TextOverflow.ellipsis,
),
),
SizedBox(width: 10.w),
AnimatedRotation(
turns: _isExpanded ? -0.5 : 0,
duration: _animationDuration,

View File

@ -47,7 +47,7 @@ class PDuration {
}
PDuration.now() {
var thisInstant = new DateTime.now();
final DateTime thisInstant = DateTime.now();
year = thisInstant.year;
month = thisInstant.month;
day = thisInstant.day;

View File

@ -20,15 +20,12 @@ import 'package:star_lock/tools/pickers/time_picker/model/suffix.dart';
import '../time_utils.dart';
typedef DateCallback(PDuration res);
typedef DateCallback = Function(PDuration res);
class DatePickerRoute<T> extends PopupRoute<T> {
DatePickerRoute({
this.mode,
required this.initDate,
required this.initDate, required this.maxDate, required this.minDate, this.mode,
this.pickerStyle,
required this.maxDate,
required this.minDate,
this.suffix,
this.onChanged,
this.onConfirm,
@ -111,13 +108,8 @@ class DatePickerRoute<T> extends PopupRoute<T> {
class _PickerContentView extends StatefulWidget {
_PickerContentView({
Key? key,
required this.initData, required this.pickerStyle, required this.maxDate, required this.minDate, required this.route, Key? key,
this.mode,
required this.initData,
required this.pickerStyle,
required this.maxDate,
required this.minDate,
required this.route,
this.hourShow24 = false,
}) : super(key: key);
@ -139,6 +131,13 @@ class _PickerContentView extends StatefulWidget {
}
class _PickerState extends State<_PickerContentView> {
_PickerState(DateMode? mode, this._initSelectData, this.maxDate, this.minDate,
this._pickerStyle, this.hourShow24) {
_dateItemModel = DateItemModel.parse(mode!);
pickerItemHeight = _pickerStyle.pickerItemHeight;
_init();
}
late final PickerStyle _pickerStyle;
// []
@ -166,13 +165,6 @@ class _PickerState extends State<_PickerContentView> {
// BUG
late double pickerItemHeight;
_PickerState(DateMode? mode, this._initSelectData, this.maxDate, this.minDate,
this._pickerStyle, this.hourShow24) {
_dateItemModel = DateItemModel.parse(mode!);
pickerItemHeight = _pickerStyle.pickerItemHeight;
_init();
}
_init() {
scrollCtrl.clear();

View File

@ -110,11 +110,14 @@ class ShowCupertinoAlertView {
color: AppColors.vipFeatureBgColor,
padding: EdgeInsets.only(left: 20.w),
height: 80.h,
width: 1.sw,
child: Row(
children: [
Text(tipsText,
style: TextStyle(
color: AppColors.vipFeatureBtnTextColor, fontSize: 22.sp)),
Flexible(
child: Text(tipsText,
style: TextStyle(
color: AppColors.vipFeatureBtnTextColor, fontSize: 22.sp)),
),
SizedBox(
width: 10.w,
),
@ -135,10 +138,11 @@ class ShowCupertinoAlertView {
style: TextStyle(color: Colors.white, fontSize: 22.sp),
)),
),
Expanded(
child: SizedBox(
width: 2.w,
))
SizedBox(width:2.w)
// Expanded(
// child: SizedBox(
// width: 2.w,
// ))
],
),
);

View File

@ -4,12 +4,12 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
typedef BlockIsHaveAllDataCallback = void Function(bool isAllData);
class ShowDeleteAdministratorIsHaveAllDataWidget extends StatefulWidget {
BlockIsHaveAllDataCallback? blockIsHaveAllDataCallback;
String? contentStr;
ShowDeleteAdministratorIsHaveAllDataWidget(
{Key? key, this.contentStr, this.blockIsHaveAllDataCallback})
: super(key: key);
BlockIsHaveAllDataCallback? blockIsHaveAllDataCallback;
String? contentStr;
@override
State<ShowDeleteAdministratorIsHaveAllDataWidget> createState() =>
@ -43,7 +43,6 @@ class _ShowDeleteAdministratorIsHaveAllDataWidgetState
),
Expanded(
child: Text(widget.contentStr!,
maxLines: 2,
textAlign: TextAlign.start,
style: TextStyle(fontSize: 24.sp))),
],

View File

@ -15,11 +15,11 @@ import 'versionUndate_entity.dart';
class VersionUndateTool {
factory VersionUndateTool() => shareManager()!;
VersionUndateTool._init() {
// _initLoadUpdateVersionData();
}
factory VersionUndateTool() => shareManager()!;
static VersionUndateTool? _manager;
static VersionUndateTool? shareManager() {
@ -35,7 +35,7 @@ class VersionUndateTool {
}
//
void getVersionData() async {
Future<void> getVersionData() async {
final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
String brandName = '';
if (Platform.isAndroid) {
@ -91,7 +91,7 @@ class VersionUndateTool {
Container(
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 10.h),
alignment: Alignment.centerLeft,
child: Text(versionUndateEntity.data!.description! ?? '',
child: Text(versionUndateEntity.data!.description!,
textAlign: TextAlign.start,
style: TextStyle(fontSize: 20.sp))),
],

View File

@ -1,8 +1,5 @@
class VersionUndateEntity {
int? errorCode;
String? description;
String? errorMsg;
Data? data;
VersionUndateEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
@ -13,6 +10,10 @@ class VersionUndateEntity {
errorMsg = json['errorMsg'];
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
int? errorCode;
String? description;
String? errorMsg;
Data? data;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
@ -27,10 +28,6 @@ class VersionUndateEntity {
}
class Data {
int? isUpdate;
String? appDownloadUrl;
String? description;
int? isForceUpdate;
Data(
{this.isUpdate,
@ -44,6 +41,10 @@ class Data {
description = json['description'];
isForceUpdate = json['isForceUpdate'];
}
int? isUpdate;
String? appDownloadUrl;
String? description;
int? isForceUpdate;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};

View File

@ -4,20 +4,18 @@ import 'package:flutter/material.dart';
import 'package:star_lock/flavors.dart';
class FlavorsImg extends StatelessWidget {
FlavorsImg({required this.child, this.black = false, key});
FlavorsImg({required this.child, Key? key, this.black = false}) : super(key: key);
bool black;
Widget child;
ColorFilterGenerator myFilter =
ColorFilterGenerator(name: "xhj", filters: []);
ColorFilterGenerator(name: 'xhj', filters: <List<double>>[]);
@override
Widget build(BuildContext context) {
myFilter = ColorFilterGenerator(name: "xhj", filters: [
black
? ColorFilterAddons.addictiveColor(-255, -255, -255)
: ColorFilterAddons.addictiveColor(1, 22, 93),
myFilter = ColorFilterGenerator(name: 'xhj', filters: <List<double>>[
if (black) ColorFilterAddons.addictiveColor(-255, -255, -255) else ColorFilterAddons.addictiveColor(1, 22, 93),
]);
if (F.appFlavor != Flavor.xhj) {
return child;

View File

@ -93,8 +93,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# 1.0.79+2024083001测试开完锁数据上传功能
# 1.0.80+2024091901添加网关功能给谢敬调试
# 1.0.80+2024091902网关功能去掉网关通信不够16倍数凑够16倍数功能
# 1.0.80+2024091902给欧阳打包测试国际化
version: 1.0.80+2024100803
version: 1.0.84+2024101601
environment:
sdk: '>=2.12.0 <3.0.0'