Merge branch 'master' of gitee.com:starlock-cn/app-starlock
# Conflicts: # star_lock/images/lan/lan_en.json # star_lock/images/lan/lan_keys.json # star_lock/images/lan/lan_zh.json 代码合并
This commit is contained in:
commit
c7bf28ec0f
@ -56,19 +56,6 @@ android {
|
|||||||
keyAlias = 'starlock'
|
keyAlias = 'starlock'
|
||||||
keyPassword '123456'
|
keyPassword '123456'
|
||||||
}
|
}
|
||||||
// 下面的local、pre、sky、xhj 都是自定义变量,自身不起任何作用,而是看哪里引用了它们
|
|
||||||
local {
|
|
||||||
storeFile file("starlock.keystore")
|
|
||||||
storePassword '123456'
|
|
||||||
keyAlias = 'starlock'
|
|
||||||
keyPassword '123456'
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
storeFile file("starlock.keystore")
|
|
||||||
storePassword '123456'
|
|
||||||
keyAlias = 'starlock'
|
|
||||||
keyPassword '123456'
|
|
||||||
}
|
|
||||||
sky {
|
sky {
|
||||||
// CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
|
// CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
|
||||||
storeFile file("sky.jks")
|
storeFile file("sky.jks")
|
||||||
@ -91,21 +78,21 @@ android {
|
|||||||
local {
|
local {
|
||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
applicationId "com.starlock.lock.local"
|
applicationId "com.starlock.lock.local"
|
||||||
signingConfig signingConfigs.pre
|
signingConfig signingConfigs.debug
|
||||||
resValue "string", "app_name", "星锁-local"
|
resValue "string", "app_name", "星锁-local"
|
||||||
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.local"
|
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.local"
|
||||||
}
|
}
|
||||||
dev {
|
dev {
|
||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
applicationId "com.starlock.lock.dev"
|
applicationId "com.starlock.lock.dev"
|
||||||
signingConfig signingConfigs.pre
|
signingConfig signingConfigs.debug
|
||||||
resValue "string", "app_name", "星锁-dev"
|
resValue "string", "app_name", "星锁-dev"
|
||||||
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.dev"
|
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.dev"
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
applicationId "com.starlock.lock.pre"
|
applicationId "com.starlock.lock.pre"
|
||||||
signingConfig signingConfigs.pre
|
signingConfig signingConfigs.debug
|
||||||
resValue "string", "app_name", "星锁"
|
resValue "string", "app_name", "星锁"
|
||||||
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.pre"
|
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.pre"
|
||||||
}
|
}
|
||||||
@ -202,9 +189,9 @@ android {
|
|||||||
// 真实的解决办法
|
// 真实的解决办法
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
shrinkResources false
|
shrinkResources false
|
||||||
productFlavors.local.signingConfig signingConfigs.pre
|
productFlavors.local.signingConfig signingConfigs.debug
|
||||||
productFlavors.dev.signingConfig signingConfigs.pre
|
productFlavors.dev.signingConfig signingConfigs.debug
|
||||||
productFlavors.pre.signingConfig signingConfigs.pre
|
productFlavors.pre.signingConfig signingConfigs.debug
|
||||||
productFlavors.sky.signingConfig signingConfigs.sky
|
productFlavors.sky.signingConfig signingConfigs.sky
|
||||||
productFlavors.xhj.signingConfig signingConfigs.xhj
|
productFlavors.xhj.signingConfig signingConfigs.xhj
|
||||||
}
|
}
|
||||||
|
|||||||
@ -700,6 +700,8 @@
|
|||||||
"重命名": "Rename",
|
"重命名": "Rename",
|
||||||
"分组下的锁将被移到未分组里": "The locks under the group will be moved to ungrouped",
|
"分组下的锁将被移到未分组里": "The locks under the group will be moved to ungrouped",
|
||||||
"编辑成功": "Edit success",
|
"编辑成功": "Edit success",
|
||||||
|
"厂商": "Manufacturer",
|
||||||
|
"型号": "Model",
|
||||||
|
|
||||||
"相机": "camera",
|
"相机": "camera",
|
||||||
"相册": "photos",
|
"相册": "photos",
|
||||||
@ -719,6 +721,7 @@
|
|||||||
"去设置": "Go set it up",
|
"去设置": "Go set it up",
|
||||||
"当前网络": "Current network",
|
"当前网络": "Current network",
|
||||||
"位置信息": "Location information",
|
"位置信息": "Location information",
|
||||||
|
"请输入wifi名称": "Please enter the wifi name",
|
||||||
|
|
||||||
"虹膜":"iris",
|
"虹膜":"iris",
|
||||||
"手掌":"palm",
|
"手掌":"palm",
|
||||||
@ -764,5 +767,8 @@
|
|||||||
"逗留警告":"Stay warning",
|
"逗留警告":"Stay warning",
|
||||||
"异常警告":"Abnormal warning",
|
"异常警告":"Abnormal warning",
|
||||||
"短信提醒":"SMS reminder",
|
"短信提醒":"SMS reminder",
|
||||||
"邮件提醒":"Email reminder"
|
"邮件提醒":"Email reminder",
|
||||||
|
"关锁":"关锁",
|
||||||
|
"功能":"功能",
|
||||||
|
"配件":"配件"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -701,6 +701,9 @@
|
|||||||
"编辑成功": "编辑成功",
|
"编辑成功": "编辑成功",
|
||||||
"当前网络": "当前网络",
|
"当前网络": "当前网络",
|
||||||
"位置信息": "位置信息",
|
"位置信息": "位置信息",
|
||||||
|
"请输入wifi名称": "请输入wifi名称",
|
||||||
|
"厂商": "厂商",
|
||||||
|
"型号": "型号",
|
||||||
|
|
||||||
"相机": "相机",
|
"相机": "相机",
|
||||||
"相册": "相册",
|
"相册": "相册",
|
||||||
@ -763,5 +766,8 @@
|
|||||||
"逗留警告":"逗留警告",
|
"逗留警告":"逗留警告",
|
||||||
"异常警告":"异常警告",
|
"异常警告":"异常警告",
|
||||||
"短信提醒":"短信提醒",
|
"短信提醒":"短信提醒",
|
||||||
"邮件提醒":"邮件提醒"
|
"邮件提醒":"邮件提醒",
|
||||||
|
"关锁":"Close Lock",
|
||||||
|
"功能":"Function",
|
||||||
|
"配件":"Parts"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -703,6 +703,9 @@
|
|||||||
"编辑成功": "编辑成功",
|
"编辑成功": "编辑成功",
|
||||||
"当前网络": "当前网络",
|
"当前网络": "当前网络",
|
||||||
"位置信息": "位置信息",
|
"位置信息": "位置信息",
|
||||||
|
"请输入wifi名称": "请输入wifi名称",
|
||||||
|
"厂商": "厂商",
|
||||||
|
"型号": "型号",
|
||||||
|
|
||||||
"相机": "相机",
|
"相机": "相机",
|
||||||
"相册": "相册",
|
"相册": "相册",
|
||||||
@ -766,5 +769,8 @@
|
|||||||
"逗留警告":"逗留警告",
|
"逗留警告":"逗留警告",
|
||||||
"异常警告":"异常警告",
|
"异常警告":"异常警告",
|
||||||
"短信提醒":"短信提醒",
|
"短信提醒":"短信提醒",
|
||||||
"邮件提醒":"邮件提醒"
|
"邮件提醒":"邮件提醒",
|
||||||
|
"关锁":"关锁",
|
||||||
|
"功能":"功能",
|
||||||
|
"配件":"配件"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,7 @@ abstract class Reply{
|
|||||||
case 0x03:
|
case 0x03:
|
||||||
// 网络中断
|
// 网络中断
|
||||||
Get.log("${commandType!.typeName} 网络中断");
|
Get.log("${commandType!.typeName} 网络中断");
|
||||||
|
showErrorMessage("网络中断");
|
||||||
break;
|
break;
|
||||||
case 0x04:
|
case 0x04:
|
||||||
// 用户未登记
|
// 用户未登记
|
||||||
@ -42,18 +43,22 @@ abstract class Reply{
|
|||||||
case 0x05:
|
case 0x05:
|
||||||
// 参数错误
|
// 参数错误
|
||||||
Get.log("${commandType!.typeName}参数错误");
|
Get.log("${commandType!.typeName}参数错误");
|
||||||
|
showErrorMessage("参数错误");
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
// 需要鉴权
|
// 需要鉴权
|
||||||
Get.log("${commandType!.typeName}需要鉴权");
|
Get.log("${commandType!.typeName}需要鉴权");
|
||||||
|
showErrorMessage("需要鉴权");
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
// 无权限
|
// 无权限
|
||||||
Get.log("${commandType!.typeName}无权限");
|
Get.log("${commandType!.typeName}无权限");
|
||||||
|
showErrorMessage("无权限");
|
||||||
break;
|
break;
|
||||||
case 0x08:
|
case 0x08:
|
||||||
// 应答超时
|
// 应答超时
|
||||||
Get.log("${commandType!.typeName}应答超时");
|
Get.log("${commandType!.typeName}应答超时");
|
||||||
|
showErrorMessage("应答超时");
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x09:
|
||||||
// 权限校验错误
|
// 权限校验错误
|
||||||
@ -97,10 +102,12 @@ abstract class Reply{
|
|||||||
case 0x11:
|
case 0x11:
|
||||||
// 无效指令
|
// 无效指令
|
||||||
Get.log("${commandType!.typeName}无效指令");
|
Get.log("${commandType!.typeName}无效指令");
|
||||||
|
showErrorMessage("无效指令");
|
||||||
break;
|
break;
|
||||||
case 0x12:
|
case 0x12:
|
||||||
// 门锁时间异常
|
// 门锁时间异常
|
||||||
Get.log("${commandType!.typeName}门锁时间异常");
|
Get.log("${commandType!.typeName}门锁时间异常");
|
||||||
|
showErrorMessage("门锁时间异常");
|
||||||
break;
|
break;
|
||||||
case 0x15:
|
case 0x15:
|
||||||
// APP(手机)未联网
|
// APP(手机)未联网
|
||||||
@ -115,6 +122,7 @@ abstract class Reply{
|
|||||||
case 0xff:
|
case 0xff:
|
||||||
// 异常,未知错误
|
// 异常,未知错误
|
||||||
Get.log("${commandType!.typeName} 0xff");
|
Get.log("${commandType!.typeName} 0xff");
|
||||||
|
showErrorMessage("异常,未知错误");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
switch(status){
|
switch(status){
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
// state.cardNumber.value = reply.data.last.toString();
|
state.cardNumber.value = reply.data.last.toString();
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
state.ifConnectScuess.value = true;
|
state.ifConnectScuess.value = true;
|
||||||
break;
|
break;
|
||||||
@ -64,14 +64,14 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
var weekStr = "00000000";
|
// var weekStr = "00000000";
|
||||||
for (var day in state.weekDay.value) {
|
// for (var day in state.weekDay.value) {
|
||||||
int index = day % 7; // 将周日的索引转换为 0
|
// int index = day % 7; // 将周日的索引转换为 0
|
||||||
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
// weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
}
|
// }
|
||||||
// 倒序 weekStr
|
// // 倒序 weekStr
|
||||||
weekStr = weekStr.split('').reversed.join('');
|
// weekStr = weekStr.split('').reversed.join('');
|
||||||
int weekRound = int.parse(weekStr, radix: 2);
|
// int weekRound = int.parse(weekStr, radix: 2);
|
||||||
// print("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
// print("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
||||||
|
|
||||||
var token = reply.data.sublist(5, 9);
|
var token = reply.data.sublist(5, 9);
|
||||||
@ -85,7 +85,7 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
useCountLimit:0xff,
|
useCountLimit:0xff,
|
||||||
isForce:state.isCoerced.value == "1" ? 0 : 1, // 是否是胁迫
|
isForce:state.isCoerced.value == "1" ? 0 : 1, // 是否是胁迫
|
||||||
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
||||||
weekRound:weekRound, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
@ -110,11 +110,11 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
switch(status){
|
switch(status){
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
if(state.cardNumber.value == (reply.data[6]).toString()){
|
// if(state.cardNumber.value == (reply.data[6]).toString()){
|
||||||
return;
|
// return;
|
||||||
}else{
|
// }else{
|
||||||
state.cardNumber.value = (reply.data[6]).toString();
|
// state.cardNumber.value = (reply.data[6]).toString();
|
||||||
}
|
// }
|
||||||
// if(state.isCoerced.value == "1"){
|
// if(state.isCoerced.value == "1"){
|
||||||
// 非胁迫
|
// 非胁迫
|
||||||
int addResultStatus = reply.data[5];
|
int addResultStatus = reply.data[5];
|
||||||
@ -205,16 +205,16 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
var weekStr = "00000000";
|
// var weekStr = "00000000";
|
||||||
print("state.weekDay.value:${state.weekDay.value}");
|
// print("state.weekDay.value:${state.weekDay.value}");
|
||||||
for (var day in state.weekDay.value) {
|
// for (var day in state.weekDay.value) {
|
||||||
int index = day % 7; // 将周日的索引转换为 0
|
// int index = day % 7; // 将周日的索引转换为 0
|
||||||
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
// weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
}
|
// }
|
||||||
// 倒序 weekStr
|
// // 倒序 weekStr
|
||||||
weekStr = weekStr.split('').reversed.join('');
|
// weekStr = weekStr.split('').reversed.join('');
|
||||||
int weekRound = int.parse(weekStr, radix: 2);
|
// int weekRound = int.parse(weekStr, radix: 2);
|
||||||
// print("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
// // print("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
||||||
|
|
||||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
@ -233,7 +233,7 @@ class AddICCardLogic extends BaseGetXController{
|
|||||||
useCountLimit:0xff,
|
useCountLimit:0xff,
|
||||||
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
||||||
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
||||||
weekRound:weekRound, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
|
|||||||
@ -42,7 +42,11 @@ class CardDetailLogic extends BaseGetXController{
|
|||||||
Get.log("${reply.commandType!.typeValue} 数据解析成功");
|
Get.log("${reply.commandType!.typeValue} 数据解析成功");
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
deletICCardData();
|
if(state.isDeletCard.value == true){
|
||||||
|
deletICCardData();
|
||||||
|
}else{
|
||||||
|
editICCardData();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
@ -64,14 +68,14 @@ class CardDetailLogic extends BaseGetXController{
|
|||||||
keyID:state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
cardNo:int.parse(state.typeNumber.value),
|
cardNo:int.parse(state.typeNumber.value),
|
||||||
useCountLimit:0,
|
useCountLimit:state.isDeletCard.value == true ? 0 : 0xff,
|
||||||
isForce:0, // 是否是胁迫
|
isForce:state.isStressFingerprint.value == true ? 1 : 0, // 是否是胁迫
|
||||||
isRound:0, // 是否是循环
|
isRound:state.keyType.value == 4 ? 1: 0, // 是否是循环
|
||||||
weekRound:0, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: 0x11223344,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: 0x11223344,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:"0",
|
startTime:DateTool().dateToHNString(state.starTime.value),
|
||||||
endTime:"0",
|
endTime:DateTool().dateToHNString(state.endTime.value),
|
||||||
needAuthor:1,
|
needAuthor:1,
|
||||||
signKey:signKeyDataList,
|
signKey:signKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey:getPrivateKeyList,
|
||||||
@ -115,14 +119,14 @@ class CardDetailLogic extends BaseGetXController{
|
|||||||
keyID:state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
cardNo:int.parse(state.typeNumber.value),
|
cardNo:int.parse(state.typeNumber.value),
|
||||||
useCountLimit:0,
|
useCountLimit:state.isDeletCard.value == true ? 0 : 0xff,
|
||||||
isForce:0, // 是否是胁迫
|
isForce:state.isStressFingerprint.value == true ? 1 : 0, // 是否是胁迫
|
||||||
isRound:0, // 是否是循环
|
isRound:state.keyType.value == 4 ? 1: 0, // 是否是循环
|
||||||
weekRound:0, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: 0x11223344,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: 0x11223344,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:"0",
|
startTime:DateTool().dateToHNString(state.starTime.value),
|
||||||
endTime:"0",
|
endTime:DateTool().dateToHNString(state.endTime.value),
|
||||||
needAuthor:1,
|
needAuthor:1,
|
||||||
signKey:signKeyDataList,
|
signKey:signKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey:getPrivateKeyList,
|
||||||
@ -158,7 +162,7 @@ class CardDetailLogic extends BaseGetXController{
|
|||||||
cardId: state.keyId.value.toString(),
|
cardId: state.keyId.value.toString(),
|
||||||
lockId: state.fingerprintItemData.value.lockId.toString(),
|
lockId: state.fingerprintItemData.value.lockId.toString(),
|
||||||
weekDay: state.weekDay.value,
|
weekDay: state.weekDay.value,
|
||||||
startDate: state.starDate.value,
|
startDate: state.startDate.value,
|
||||||
endDate: state.endDate.value,
|
endDate: state.endDate.value,
|
||||||
isCoerced: state.isStressFingerprint.value ? "2" : "1",
|
isCoerced: state.isStressFingerprint.value ? "2" : "1",
|
||||||
cardName: state.changeNameController.text,
|
cardName: state.changeNameController.text,
|
||||||
@ -194,9 +198,9 @@ class CardDetailLogic extends BaseGetXController{
|
|||||||
if(state.keyType.value == 1){
|
if(state.keyType.value == 1){
|
||||||
useDateStr = "永久".tr;
|
useDateStr = "永久".tr;
|
||||||
}else if(state.keyType.value == 2){
|
}else if(state.keyType.value == 2){
|
||||||
useDateStr = "${DateTool().dateToYMDHNString(state.starDate.value)}\n${DateTool().dateToYMDHNString(state.endDate.value)}";
|
useDateStr = "${DateTool().dateToYMDHNString(state.startDate.value)}\n${DateTool().dateToYMDHNString(state.endDate.value)}";
|
||||||
} else if(state.keyType.value == 4){
|
} else if(state.keyType.value == 4){
|
||||||
useDateStr = "${DateTool().dateToYMDString(state.starDate.value)}\n${DateTool().dateToYMDString(state.endDate.value)}";
|
useDateStr = "${DateTool().dateToYMDString(state.startDate.value)}\n${DateTool().dateToYMDString(state.endDate.value)}";
|
||||||
}
|
}
|
||||||
return useDateStr;
|
return useDateStr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,7 +70,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
});
|
});
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.starDate.value = data["beginTimeTimestamp"];
|
state.startDate.value = data["beginTimeTimestamp"];
|
||||||
state.endDate.value = data["endTimeTimestamp"];
|
state.endDate.value = data["endTimeTimestamp"];
|
||||||
state.keyType.value = 2;
|
state.keyType.value = 2;
|
||||||
});
|
});
|
||||||
@ -83,7 +83,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
});
|
});
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.starDate.value = data["starDate"];
|
state.startDate.value = data["starDate"];
|
||||||
state.endDate.value = data["endDate"];
|
state.endDate.value = data["endDate"];
|
||||||
state.starTime.value = data["starTime"];
|
state.starTime.value = data["starTime"];
|
||||||
state.endTime.value = data["endTime"];
|
state.endTime.value = data["endTime"];
|
||||||
@ -107,7 +107,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
});
|
});
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.starDate.value = data["starDate"];
|
state.startDate.value = data["starDate"];
|
||||||
state.endDate.value = data["endDate"];
|
state.endDate.value = data["endDate"];
|
||||||
state.starTime.value = data["starTime"];
|
state.starTime.value = data["starTime"];
|
||||||
state.endTime.value = data["endTime"];
|
state.endTime.value = data["endTime"];
|
||||||
@ -128,7 +128,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
});
|
});
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.starDate.value = data["starDate"];
|
state.startDate.value = data["starDate"];
|
||||||
state.endDate.value = data["endDate"];
|
state.endDate.value = data["endDate"];
|
||||||
state.starTime.value = data["starTime"];
|
state.starTime.value = data["starTime"];
|
||||||
state.endTime.value = data["endTime"];
|
state.endTime.value = data["endTime"];
|
||||||
@ -173,6 +173,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, () async {
|
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, () async {
|
||||||
|
state.isDeletCard.value = true;
|
||||||
logic.senderAddICCard();
|
logic.senderAddICCard();
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
@ -191,7 +192,8 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.isStressFingerprint.value = value;
|
state.isStressFingerprint.value = value;
|
||||||
logic.editICCardData();
|
state.isDeletCard.value = false;
|
||||||
|
logic.senderAddICCard();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@ -12,10 +12,12 @@ class CardDetailState{
|
|||||||
|
|
||||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||||
var sureBtnState = 0.obs;// 0普通状态(可用) 1连接中(不可用)
|
var sureBtnState = 0.obs;// 0普通状态(可用) 1连接中(不可用)
|
||||||
|
var isDeletCard = true.obs;// 是否删除卡
|
||||||
|
var isStressFingerprint = false.obs;// 是否胁迫
|
||||||
|
|
||||||
final typeNumber = "".obs;// 指纹号
|
final typeNumber = "".obs;// 指纹号
|
||||||
final typeName = "".obs;// 指纹名字
|
final typeName = "".obs;// 指纹名字
|
||||||
var starDate = "".obs;// 开始时间
|
var startDate = "".obs;// 开始时间
|
||||||
var endDate = "".obs;// 结束时间
|
var endDate = "".obs;// 结束时间
|
||||||
var starTime = "".obs;// 生效时间
|
var starTime = "".obs;// 生效时间
|
||||||
var endTime = "".obs;// 失效时间
|
var endTime = "".obs;// 失效时间
|
||||||
@ -25,7 +27,6 @@ class CardDetailState{
|
|||||||
var addTime = 0.obs;// 添加时间
|
var addTime = 0.obs;// 添加时间
|
||||||
var keyId = 0.obs;// 卡id
|
var keyId = 0.obs;// 卡id
|
||||||
|
|
||||||
final isStressFingerprint = false.obs;
|
|
||||||
CardDetailState() {
|
CardDetailState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
if ((map["fingerprintItemData"] != null)) {
|
if ((map["fingerprintItemData"] != null)) {
|
||||||
@ -34,15 +35,15 @@ class CardDetailState{
|
|||||||
typeNumber.value = fingerprintItemData.value.cardNumber!;
|
typeNumber.value = fingerprintItemData.value.cardNumber!;
|
||||||
typeName.value = fingerprintItemData.value.cardName!;
|
typeName.value = fingerprintItemData.value.cardName!;
|
||||||
changeNameController.text = typeName.value;
|
changeNameController.text = typeName.value;
|
||||||
starDate.value = fingerprintItemData.value.startDate!.toString();
|
startDate.value = fingerprintItemData.value.startDate!.toString();
|
||||||
endDate.value = fingerprintItemData.value.endDate!.toString();
|
endDate.value = fingerprintItemData.value.endDate!.toString();
|
||||||
starTime.value = fingerprintItemData.value.startDate!.toString();
|
starTime.value = fingerprintItemData.value.startDate!.toString();
|
||||||
endTime.value = fingerprintItemData.value.endDate!.toString();
|
endTime.value = fingerprintItemData.value.endDate!.toString();
|
||||||
keyType.value = fingerprintItemData.value.cardType!;
|
keyType.value = fingerprintItemData.value.cardType!;
|
||||||
adder.value = fingerprintItemData.value.senderUsername!;
|
adder.value = fingerprintItemData.value.senderUsername!;
|
||||||
addTime.value = fingerprintItemData.value.createDate!;
|
addTime.value = fingerprintItemData.value.createDate!;
|
||||||
isStressFingerprint.value =
|
isStressFingerprint.value = fingerprintItemData.value.isCoerced! == 2 ? true : false;
|
||||||
fingerprintItemData.value.isCoerced! == 2 ? true : false;
|
|
||||||
weekDay.value = fingerprintItemData.value.weekDay!;
|
weekDay.value = fingerprintItemData.value.weekDay!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,14 +81,14 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
var saveStrList = changeIntListToStringList(token);
|
var saveStrList = changeIntListToStringList(token);
|
||||||
Storage.setStringList(saveBlueToken, saveStrList);
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
var weekStr = "00000000";
|
// var weekStr = "00000000";
|
||||||
for (var day in state.weekDay.value) {
|
// for (var day in state.weekDay.value) {
|
||||||
int index = day % 7; // 将周日的索引转换为 0
|
// int index = day % 7; // 将周日的索引转换为 0
|
||||||
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
// weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
}
|
// }
|
||||||
// 倒序 weekStr
|
// // 倒序 weekStr
|
||||||
weekStr = weekStr.split('').reversed.join('');
|
// weekStr = weekStr.split('').reversed.join('');
|
||||||
int weekRound = int.parse(weekStr, radix: 2);
|
// int weekRound = int.parse(weekStr, radix: 2);
|
||||||
|
|
||||||
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
||||||
keyID:"1",
|
keyID:"1",
|
||||||
@ -97,7 +97,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
useCountLimit:0xff,
|
useCountLimit:0xff,
|
||||||
isForce:state.isCoerced.value == "1" ? 1 : 0, // 是否是胁迫
|
isForce:state.isCoerced.value == "1" ? 1 : 0, // 是否是胁迫
|
||||||
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
||||||
weekRound:weekRound, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
@ -260,14 +260,14 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
var weekStr = "00000000";
|
// var weekStr = "00000000";
|
||||||
for (var day in state.weekDay.value) {
|
// for (var day in state.weekDay.value) {
|
||||||
int index = day % 7; // 将周日的索引转换为 0
|
// int index = day % 7; // 将周日的索引转换为 0
|
||||||
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
// weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
}
|
// }
|
||||||
// 倒序 weekStr
|
// // 倒序 weekStr
|
||||||
weekStr = weekStr.split('').reversed.join('');
|
// weekStr = weekStr.split('').reversed.join('');
|
||||||
int weekRound = int.parse(weekStr, radix: 2);
|
// int weekRound = int.parse(weekStr, radix: 2);
|
||||||
// Get.log("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
// Get.log("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
@ -287,7 +287,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
useCountLimit:0xff,
|
useCountLimit:0xff,
|
||||||
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
||||||
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
||||||
weekRound:weekRound, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
|
|||||||
@ -42,7 +42,11 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
deletFingerprintsData();
|
if(state.isDeletFingerprint.value == true){
|
||||||
|
deletFingerprintsData();
|
||||||
|
}else{
|
||||||
|
editFingerprintsData();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
@ -64,14 +68,14 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
keyID:state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
fingerNo:int.parse(state.typeNumber.value),
|
fingerNo:int.parse(state.typeNumber.value),
|
||||||
useCountLimit:0xff,
|
useCountLimit:state.isDeletFingerprint.value == true ? 0 : 0xff,
|
||||||
isForce:0, // 是否是胁迫
|
isForce:state.isStressFingerprint.value == true ? 1 : 0, // 是否是胁迫
|
||||||
isRound:0, // 是否是循环
|
isRound:state.keyType.value == 4 ? 1: 0, // 是否是循环
|
||||||
weekRound:0, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: 0x11223344,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: 0x11223344,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:"0",
|
startTime:DateTool().dateToHNString(state.startDate.value),
|
||||||
endTime:"0",
|
endTime:DateTool().dateToHNString(state.endTime.value),
|
||||||
needAuthor:1,
|
needAuthor:1,
|
||||||
signKey:signKeyDataList,
|
signKey:signKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey:getPrivateKeyList,
|
||||||
@ -115,14 +119,14 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
keyID:state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
fingerNo:int.parse(state.typeNumber.value),
|
fingerNo:int.parse(state.typeNumber.value),
|
||||||
useCountLimit:0xff,
|
useCountLimit:state.isDeletFingerprint.value == true ? 0 : 0xff,
|
||||||
isForce:0, // 是否是胁迫
|
isForce:state.isStressFingerprint.value == true ? 1 : 0, // 是否是胁迫
|
||||||
isRound:0, // 是否是循环
|
isRound:state.keyType.value == 4 ? 1: 0, // 是否是循环
|
||||||
weekRound:0, // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: 0x11223344,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: 0x11223344,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
startTime:"0",
|
startTime:DateTool().dateToHNString(state.startDate.value),
|
||||||
endTime:"0",
|
endTime:DateTool().dateToHNString(state.endTime.value),
|
||||||
needAuthor:1,
|
needAuthor:1,
|
||||||
signKey:signKeyDataList,
|
signKey:signKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey:getPrivateKeyList,
|
||||||
@ -178,7 +182,7 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
isCoerced: state.isStressFingerprint.value ? "2" : "1",
|
isCoerced: state.isStressFingerprint.value ? "2" : "1",
|
||||||
fingerprintName: state.changeNameController.text,
|
fingerprintName: state.changeNameController.text,
|
||||||
changeType: "1",
|
changeType: "1",
|
||||||
startTime: int.parse(state.starTime.value),
|
startTime: int.parse(state.startDate.value),
|
||||||
endTime: int.parse(state.endTime.value),
|
endTime: int.parse(state.endTime.value),
|
||||||
fingerprintType: state.fingerprintItemData.value.fingerprintType!,
|
fingerprintType: state.fingerprintItemData.value.fingerprintType!,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -93,7 +93,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
|
|
||||||
state.starDate.value = data["starDate"];
|
state.starDate.value = data["starDate"];
|
||||||
state.endDate.value = data["endDate"];
|
state.endDate.value = data["endDate"];
|
||||||
state.starTime.value = data["starTime"];
|
state.startDate.value = data["starTime"];
|
||||||
state.endTime.value = data["endTime"];
|
state.endTime.value = data["endTime"];
|
||||||
state.weekDay.value = data["weekDay"];
|
state.weekDay.value = data["weekDay"];
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
setState(() {
|
setState(() {
|
||||||
state.starDate.value = data["starDate"];
|
state.starDate.value = data["starDate"];
|
||||||
state.endDate.value = data["endDate"];
|
state.endDate.value = data["endDate"];
|
||||||
state.starTime.value = data["starTime"];
|
state.startDate.value = data["starTime"];
|
||||||
state.endTime.value = data["endTime"];
|
state.endTime.value = data["endTime"];
|
||||||
state.weekDay.value = data["weekDay"];
|
state.weekDay.value = data["weekDay"];
|
||||||
});
|
});
|
||||||
@ -127,7 +127,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
visible: state.keyType.value == 4 ? true : false,
|
visible: state.keyType.value == 4 ? true : false,
|
||||||
child: Obx(() => CommonItem(
|
child: Obx(() => CommonItem(
|
||||||
leftTitel: "有效时间".tr,
|
leftTitel: "有效时间".tr,
|
||||||
rightTitle: "${DateTool().dateToHNString(state.starTime.value)}-${DateTool().dateToHNString(state.endTime.value)}",
|
rightTitle: "${DateTool().dateToHNString(state.startDate.value)}-${DateTool().dateToHNString(state.endTime.value)}",
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var data = await Get.toNamed(Routers.otherTypeKeyChangeValidityDatePage, arguments: {
|
var data = await Get.toNamed(Routers.otherTypeKeyChangeValidityDatePage, arguments: {
|
||||||
@ -138,7 +138,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
setState(() {
|
setState(() {
|
||||||
state.starDate.value = data["starDate"];
|
state.starDate.value = data["starDate"];
|
||||||
state.endDate.value = data["endDate"];
|
state.endDate.value = data["endDate"];
|
||||||
state.starTime.value = data["starTime"];
|
state.startDate.value = data["starTime"];
|
||||||
state.endTime.value = data["endTime"];
|
state.endTime.value = data["endTime"];
|
||||||
state.weekDay.value = data["validityValue"];
|
state.weekDay.value = data["validityValue"];
|
||||||
});
|
});
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class FingerprintDetailState{
|
|||||||
final typeName = "".obs;// 指纹名字
|
final typeName = "".obs;// 指纹名字
|
||||||
var starDate = "".obs;// 开始时间
|
var starDate = "".obs;// 开始时间
|
||||||
var endDate = "".obs;// 结束时间
|
var endDate = "".obs;// 结束时间
|
||||||
var starTime = "".obs;// 生效时间
|
var startDate = "".obs;// 生效时间
|
||||||
var endTime = "".obs;// 失效时间
|
var endTime = "".obs;// 失效时间
|
||||||
final keyType = 0.obs;// 永久:1;限时2,单次3,循环:4
|
final keyType = 0.obs;// 永久:1;限时2,单次3,循环:4
|
||||||
var weekDay = [].obs;// 有效日
|
var weekDay = [].obs;// 有效日
|
||||||
@ -23,8 +23,9 @@ class FingerprintDetailState{
|
|||||||
|
|
||||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||||
var sureBtnState = 0.obs;// 0普通状态(可用) 1连接中(不可用)
|
var sureBtnState = 0.obs;// 0普通状态(可用) 1连接中(不可用)
|
||||||
|
var isDeletFingerprint = true.obs;// 是否删除卡
|
||||||
final isStressFingerprint = false.obs;
|
final isStressFingerprint = false.obs;
|
||||||
|
|
||||||
FingerprintDetailState() {
|
FingerprintDetailState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
if ((map["fingerprintItemData"] != null)) {
|
if ((map["fingerprintItemData"] != null)) {
|
||||||
@ -35,7 +36,7 @@ class FingerprintDetailState{
|
|||||||
changeNameController.text = typeName.value;
|
changeNameController.text = typeName.value;
|
||||||
starDate.value = fingerprintItemData.value.startDate!.toString();
|
starDate.value = fingerprintItemData.value.startDate!.toString();
|
||||||
endDate.value = fingerprintItemData.value.endDate!.toString();
|
endDate.value = fingerprintItemData.value.endDate!.toString();
|
||||||
starTime.value = fingerprintItemData.value.startDate!.toString();
|
startDate.value = fingerprintItemData.value.startDate!.toString();
|
||||||
endTime.value = fingerprintItemData.value.endDate!.toString();
|
endTime.value = fingerprintItemData.value.endDate!.toString();
|
||||||
keyType.value = fingerprintItemData.value.fingerprintType!;
|
keyType.value = fingerprintItemData.value.fingerprintType!;
|
||||||
adder.value = fingerprintItemData.value.senderUsername!;
|
adder.value = fingerprintItemData.value.senderUsername!;
|
||||||
|
|||||||
@ -141,7 +141,56 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
state.widgetContext = context;
|
state.widgetContext = context;
|
||||||
loadData();
|
loadData();
|
||||||
|
return F.sw(defaultCall: () => skWidget(), xhjCall: () => xhjWidget());
|
||||||
|
}
|
||||||
|
|
||||||
|
//鑫泓佳布局
|
||||||
|
Widget xhjWidget() {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Obx(() {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 45.h,
|
||||||
|
),
|
||||||
|
infoView(),
|
||||||
|
SizedBox(
|
||||||
|
height: 35.h,
|
||||||
|
),
|
||||||
|
labelGridView('功能'.tr, getBottomWidget()),
|
||||||
|
labelListView('配件'.tr, getAttachmentWidget()),
|
||||||
|
SizedBox(
|
||||||
|
height: 45.h,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 52.w, right: 52.w),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
buttonView('关锁'.tr, () {
|
||||||
|
if (state.openDoorBtnisUneable.value == true) {
|
||||||
|
startUnLock();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
buttonView('开锁'.tr, () {
|
||||||
|
if (state.openDoorBtnisUneable.value == true) {
|
||||||
|
startOpenLock();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//斯凯布局
|
||||||
|
Widget skWidget() {
|
||||||
return ListView(
|
return ListView(
|
||||||
children: [
|
children: [
|
||||||
Visibility(
|
Visibility(
|
||||||
@ -195,12 +244,10 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
child: PageView(
|
child: PageView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
controller: state.pageController,
|
controller: state.pageController,
|
||||||
// child: Row(
|
|
||||||
children: [
|
children: [
|
||||||
Obx(() => bottomWidget()),
|
Obx(() => bottomWidget()),
|
||||||
attachmentWidget(),
|
attachmentWidget(),
|
||||||
],
|
],
|
||||||
// ),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
@ -227,6 +274,212 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//操作锁按钮
|
||||||
|
Widget buttonView(String text, VoidCallback? onPressed) {
|
||||||
|
bool openLockBtnState = state.openLockBtnState.value != 0;
|
||||||
|
return ElevatedButton(
|
||||||
|
onPressed: openLockBtnState ? null : onPressed,
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: openLockBtnState
|
||||||
|
? AppColors.mainBackgroundColor
|
||||||
|
: AppColors.mainColor,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
// 设置按钮的形状
|
||||||
|
borderRadius: BorderRadius.circular(8), // 圆角的大小
|
||||||
|
)),
|
||||||
|
child: SizedBox(
|
||||||
|
height: 0.12.sh,
|
||||||
|
width: 0.12.sh,
|
||||||
|
child: Center(
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
text,
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
openLockBtnState ? AppColors.mainColor : Colors.white),
|
||||||
|
),
|
||||||
|
if (openLockBtnState)
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 15.w),
|
||||||
|
width: 15.r,
|
||||||
|
height: 15.r,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
strokeWidth: 3.5,
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget infoView() {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(left: 35.w, right: 10.w),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
state.lockAlias.value,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
color: state.isOpenPassageMode.value == 1
|
||||||
|
? AppColors.openPassageModeColor
|
||||||
|
: AppColors.darkGrayTextColor),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.h,
|
||||||
|
),
|
||||||
|
adminInfoView(center: false, max: false),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
FlavorsImg(
|
||||||
|
child: Image.asset(
|
||||||
|
showElectricIcon(state.electricQuantity.value),
|
||||||
|
width: 30.w,
|
||||||
|
height: 24.w),
|
||||||
|
),
|
||||||
|
SizedBox(width: 2.w),
|
||||||
|
Text("${state.electricQuantity.value}%",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.sp, color: AppColors.darkGrayTextColor)),
|
||||||
|
SizedBox(width: 2.w),
|
||||||
|
FlavorsImg(
|
||||||
|
child: Icon(
|
||||||
|
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||||||
|
color: AppColors.mainColor, // 设置图标颜色为红色
|
||||||
|
size: 25.w, // 设置图标大小为 30
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.h,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
FlavorsImg(
|
||||||
|
child: Image.asset(
|
||||||
|
showElectricIcon(state.electricQuantity.value),
|
||||||
|
width: 30.w,
|
||||||
|
height: 24.w),
|
||||||
|
),
|
||||||
|
SizedBox(width: 2.w),
|
||||||
|
Text("--%",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.sp, color: AppColors.darkGrayTextColor)),
|
||||||
|
SizedBox(width: 2.w),
|
||||||
|
FlavorsImg(
|
||||||
|
child: Icon(
|
||||||
|
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||||||
|
color: AppColors.mainColor, // 设置图标颜色为红色
|
||||||
|
size: 25.w, // 设置图标大小为 30
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//带标签的 GridView 布局
|
||||||
|
Widget labelGridView(String text, List<Widget> children) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 40.w,
|
||||||
|
top: 20.h,
|
||||||
|
bottom: 20.h,
|
||||||
|
),
|
||||||
|
child: Text(text))),
|
||||||
|
SizedBox(
|
||||||
|
height: 200.h,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GridView.count(
|
||||||
|
padding: EdgeInsets.only(left: 15.w, right: 15.w),
|
||||||
|
crossAxisCount: 2,
|
||||||
|
childAspectRatio: 0.7,
|
||||||
|
crossAxisSpacing: 25.h,
|
||||||
|
mainAxisSpacing: 25.w,
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
children: children),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 0.w, right: 4.w),
|
||||||
|
child: const Icon(Icons.arrow_forward_ios_rounded),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//带标签的 ListView 布局
|
||||||
|
Widget labelListView(String text, List<Widget> children) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 40.w,
|
||||||
|
top: 20.h,
|
||||||
|
bottom: 20.h,
|
||||||
|
),
|
||||||
|
child: Text(text))),
|
||||||
|
SizedBox(
|
||||||
|
height: 100.h,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GridView.count(
|
||||||
|
padding: EdgeInsets.only(left: 15.w, right: 15.w),
|
||||||
|
crossAxisCount: 1,
|
||||||
|
childAspectRatio: 0.7,
|
||||||
|
crossAxisSpacing: 25.h,
|
||||||
|
mainAxisSpacing: 25.w,
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
children: children),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 0.w, right: 4.w),
|
||||||
|
child: Icon(Icons.arrow_forward_ios_rounded),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget topWidget() {
|
Widget topWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
@ -421,10 +674,12 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget adminInfoView({bool center = true, bool add = false}) {
|
Widget adminInfoView(
|
||||||
|
{bool center = true, bool max = true, bool add = false}) {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
center ? MainAxisAlignment.center : MainAxisAlignment.start,
|
center ? MainAxisAlignment.center : MainAxisAlignment.start,
|
||||||
|
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/icon_electronicKey_admin.png',
|
'images/icon_electronicKey_admin.png',
|
||||||
@ -539,7 +794,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: ScreenUtil().screenWidth - 20.w,
|
width: ScreenUtil().screenWidth - 20.w,
|
||||||
child: GridView.count(
|
child: GridView.count(
|
||||||
crossAxisCount: F.sw(defaultCall: () => 4, xhjCall: () => 3),
|
crossAxisCount: 4,
|
||||||
// childAspectRatio: 3,
|
// childAspectRatio: 3,
|
||||||
crossAxisSpacing: 20.w,
|
crossAxisSpacing: 20.w,
|
||||||
mainAxisSpacing: 0.h,
|
mainAxisSpacing: 0.h,
|
||||||
@ -584,14 +839,12 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: ScreenUtil().screenWidth - 20.w,
|
width: ScreenUtil().screenWidth - 20.w,
|
||||||
child: GridView.count(
|
child: GridView.count(
|
||||||
crossAxisCount: F.sw(defaultCall: () => 4, xhjCall: () => 3),
|
crossAxisCount: 4,
|
||||||
// childAspectRatio: 3,
|
// childAspectRatio: 3,
|
||||||
crossAxisSpacing: 25.h,
|
crossAxisSpacing: 25.h,
|
||||||
mainAxisSpacing: 0.h,
|
mainAxisSpacing: 0.h,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: F.sw(
|
children: getBottomWidget()),
|
||||||
defaultCall: () => getBottomWidget(),
|
|
||||||
xhjCall: () => getBottomWidget().reversed.toList())),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -835,8 +1088,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
//
|
//
|
||||||
Widget bottomItem(String iconUrl, String name, bool openDoorBtnisUneable,
|
Widget bottomItem(String iconUrl, String name, bool openDoorBtnisUneable,
|
||||||
bool bottomBtnisEable, Function() onClick) {
|
bool bottomBtnisEable, Function() onClick) {
|
||||||
var width = F.sw(defaultCall: () => 42.w, xhjCall: () => 63.w);
|
|
||||||
var height = F.sw(defaultCall: () => 42.h, xhjCall: () => 63.h);
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: openDoorBtnisUneable
|
onTap: openDoorBtnisUneable
|
||||||
? (bottomBtnisEable
|
? (bottomBtnisEable
|
||||||
@ -852,12 +1103,13 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: width,
|
width: 42.w,
|
||||||
height: height,
|
height: 42.h,
|
||||||
child: FlavorsImg(
|
child: FlavorsImg(
|
||||||
|
black: true,
|
||||||
child: Image.asset(iconUrl,
|
child: Image.asset(iconUrl,
|
||||||
width: width,
|
width: 42.w,
|
||||||
height: height,
|
height: 42.w,
|
||||||
color: openDoorBtnisUneable
|
color: openDoorBtnisUneable
|
||||||
? (bottomBtnisEable
|
? (bottomBtnisEable
|
||||||
? AppColors.mainColor
|
? AppColors.mainColor
|
||||||
@ -916,28 +1168,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return 'images/main/icon_lockElectricLevel_5.png';
|
return 'images/main/icon_lockElectricLevel_5.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
//开锁成功弹出的小界面
|
|
||||||
void _showFullScreenOverlay(BuildContext context) {
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
isScrollControlled: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.of(context).pop(); // 关闭底部表单
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: MediaQuery.of(context).size.height,
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
color: Colors.black.withOpacity(0.5),
|
|
||||||
child: _unlockSuccessWidget(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _unlockSuccessWidget() {
|
Widget _unlockSuccessWidget() {
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
@ -989,6 +1219,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
state.openLockBtnState.value = 1;
|
state.openLockBtnState.value = 1;
|
||||||
// state.animationController!.forward();
|
// state.animationController!.forward();
|
||||||
|
|
||||||
|
state.openDoorModel = 1;
|
||||||
if (state.lockUserNo == 0) {
|
if (state.lockUserNo == 0) {
|
||||||
// 电子钥匙lockUserNo为0 要先添加用户
|
// 电子钥匙lockUserNo为0 要先添加用户
|
||||||
logic.addUserConnectBlue();
|
logic.addUserConnectBlue();
|
||||||
@ -996,7 +1227,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
// print("state.isOpenLockNeedOnline.value:${state.isOpenLockNeedOnline.value}");
|
// print("state.isOpenLockNeedOnline.value:${state.isOpenLockNeedOnline.value}");
|
||||||
if (state.isOpenLockNeedOnline.value == 0) {
|
if (state.isOpenLockNeedOnline.value == 0) {
|
||||||
// 不需要联网
|
// 不需要联网
|
||||||
state.openDoorModel = 1;
|
|
||||||
logic.openDoorAction();
|
logic.openDoorAction();
|
||||||
} else {
|
} else {
|
||||||
// 需要联网
|
// 需要联网
|
||||||
@ -1014,20 +1244,18 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
state.iSClosedUnlockSuccessfulPopup.value = false;
|
state.iSClosedUnlockSuccessfulPopup.value = false;
|
||||||
state.openLockBtnState.value = 1;
|
state.openLockBtnState.value = 1;
|
||||||
state.animationController!.forward();
|
state.animationController!.forward();
|
||||||
|
state.openDoorModel = 32;
|
||||||
|
|
||||||
if (state.lockUserNo == 0) {
|
if (state.lockUserNo == 0) {
|
||||||
// 电子钥匙lockUserNo为0 要先添加用户
|
// 电子钥匙lockUserNo为0 要先添加用户
|
||||||
logic.addUserConnectBlue();
|
logic.addUserConnectBlue();
|
||||||
} else {
|
} else {
|
||||||
state.openDoorModel = 32;
|
|
||||||
logic.openDoorAction();
|
logic.openDoorAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
|
||||||
|
|
||||||
/// 取消路由订阅
|
/// 取消路由订阅
|
||||||
Get.log("LockDetailPage===dispose");
|
Get.log("LockDetailPage===dispose");
|
||||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||||
@ -1036,7 +1264,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
state.replySubscription.cancel();
|
state.replySubscription.cancel();
|
||||||
state.lockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceEvent!
|
state.lockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceEvent!
|
||||||
.cancel();
|
.cancel();
|
||||||
|
|
||||||
if (state.animationController != null) {
|
if (state.animationController != null) {
|
||||||
state.animationController!.dispose();
|
state.animationController!.dispose();
|
||||||
state.animationController = null;
|
state.animationController = null;
|
||||||
|
|||||||
@ -52,6 +52,16 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
rightTitle:
|
rightTitle:
|
||||||
"${state.lockBasicInfo.value.mac??""}/${state.lockBasicInfo.value.lockId??""}",
|
"${state.lockBasicInfo.value.mac??""}/${state.lockBasicInfo.value.lockId??""}",
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
|
isHaveLine: true)),
|
||||||
|
Obx(() => CommonItem(
|
||||||
|
leftTitel: "厂商".tr,
|
||||||
|
rightTitle: state.lockBasicInfo.value.vendor ??"",
|
||||||
|
allHeight: 70.h,
|
||||||
|
isHaveLine: true)),
|
||||||
|
Obx(() => CommonItem(
|
||||||
|
leftTitel: "型号".tr,
|
||||||
|
rightTitle: state.lockBasicInfo.value.model ??"",
|
||||||
|
allHeight: 70.h,
|
||||||
isHaveLine: false)),
|
isHaveLine: false)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
@ -153,9 +163,20 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
)),
|
)),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: "位置信息".tr,
|
leftTitel: "位置信息".tr,
|
||||||
rightTitle: state.lockBasicInfo.value.address ?? "-",
|
// rightTitle: state.lockBasicInfo.value.address ?? "-",
|
||||||
allHeight: 70.h,
|
allHeight: 80.h,
|
||||||
isHaveLine: true)),
|
isHaveLine: false,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: Container(
|
||||||
|
width: 300.w,
|
||||||
|
child: Text(state.lockBasicInfo.value.address ?? "-",
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp,
|
||||||
|
color: AppColors.darkGrayTextColor)),
|
||||||
|
),)),
|
||||||
/* 2024-01-12 会议确定去掉“微信二维码” by DaisyWu
|
/* 2024-01-12 会议确定去掉“微信二维码” by DaisyWu
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import '../../../../../blue/io_tool/io_tool.dart';
|
|||||||
import '../../../../../blue/io_tool/manager_event_bus.dart';
|
import '../../../../../blue/io_tool/manager_event_bus.dart';
|
||||||
import '../../../../../blue/sender_manage.dart';
|
import '../../../../../blue/sender_manage.dart';
|
||||||
import '../../../../../network/api_repository.dart';
|
import '../../../../../network/api_repository.dart';
|
||||||
|
import '../../../../../tools/eventBusEventManage.dart';
|
||||||
import '../../../../../tools/storage.dart';
|
import '../../../../../tools/storage.dart';
|
||||||
import 'configuringWifi_state.dart';
|
import 'configuringWifi_state.dart';
|
||||||
|
|
||||||
@ -26,23 +27,19 @@ class ConfiguringWifiLogic extends BaseGetXController{
|
|||||||
var entity = await ApiRepository.to.getWifiLockServiceIpAndPort();
|
var entity = await ApiRepository.to.getWifiLockServiceIpAndPort();
|
||||||
if(entity.errorCode! == 0){
|
if(entity.errorCode! == 0){
|
||||||
state.configuringWifiEntity.value = entity;
|
state.configuringWifiEntity.value = entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// var serversList = <int>[];
|
void updateNetworkInfo() async{
|
||||||
// for(int i = 0; i<state.configuringWifiEntity.value.data!.serviceList!.length; i++){
|
var entity = await ApiRepository.to.updateNetworkInfo(
|
||||||
// var item = state.configuringWifiEntity.value.data!.serviceList![i];
|
lockId: state.lockSetInfoData.value.lockId!,
|
||||||
// var itemList = item.serviceIp!.split(".");
|
network:state.wifiNameController.text,
|
||||||
// itemList.forEach((element) {
|
);
|
||||||
// serversList.add(int.parse(element));
|
if(entity.errorCode!.codeIsSuccessful){
|
||||||
// });
|
showToast("配网成功", something:(){
|
||||||
// // serversList.add(int.parse(item.port!));
|
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||||
//
|
Get.close(2);
|
||||||
// double typeDouble = int.parse(item.port!) / 256;
|
});
|
||||||
// int type1 = typeDouble.toInt();
|
|
||||||
// int type2 = int.parse(item.port!) % 256;
|
|
||||||
// serversList.add(type1);
|
|
||||||
// serversList.add(type2);
|
|
||||||
// }
|
|
||||||
// print("serversListserversList:$serversList");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,9 +65,7 @@ class ConfiguringWifiLogic extends BaseGetXController{
|
|||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
showToast("配网成功", something:(){
|
updateNetworkInfo();
|
||||||
Get.close(2);
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
@ -131,6 +126,11 @@ class ConfiguringWifiLogic extends BaseGetXController{
|
|||||||
|
|
||||||
// 点击配置wifi
|
// 点击配置wifi
|
||||||
Future<void> senderConfiguringWifiAction() async {
|
Future<void> senderConfiguringWifiAction() async {
|
||||||
|
if(state.wifiNameController.text.isEmpty){
|
||||||
|
showToast("请输入wifi名称");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(state.sureBtnState.value == 1){
|
if(state.sureBtnState.value == 1){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -341,6 +341,7 @@ class LockBasicInfo {
|
|||||||
List? weekDays;
|
List? weekDays;
|
||||||
String? address;
|
String? address;
|
||||||
String? network;
|
String? network;
|
||||||
|
String? vendor;
|
||||||
|
|
||||||
LockBasicInfo(
|
LockBasicInfo(
|
||||||
{this.lockId,
|
{this.lockId,
|
||||||
@ -365,7 +366,8 @@ class LockBasicInfo {
|
|||||||
this.lockUserNo,
|
this.lockUserNo,
|
||||||
this.weekDays,
|
this.weekDays,
|
||||||
this.address,
|
this.address,
|
||||||
this.network});
|
this.network,
|
||||||
|
this.vendor});
|
||||||
|
|
||||||
LockBasicInfo.fromJson(Map<String, dynamic> json) {
|
LockBasicInfo.fromJson(Map<String, dynamic> json) {
|
||||||
lockId = json['lockId'];
|
lockId = json['lockId'];
|
||||||
@ -396,6 +398,7 @@ class LockBasicInfo {
|
|||||||
weekDays = json['weekDays'];
|
weekDays = json['weekDays'];
|
||||||
address = json['address'];
|
address = json['address'];
|
||||||
network = json['network'];
|
network = json['network'];
|
||||||
|
vendor = json['vendor'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -425,6 +428,7 @@ class LockBasicInfo {
|
|||||||
data['weekDays'] = weekDays;
|
data['weekDays'] = weekDays;
|
||||||
data['address'] = address;
|
data['address'] = address;
|
||||||
data['network'] = network;
|
data['network'] = network;
|
||||||
|
data['vendor'] = vendor;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,8 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
final state = Get.find<LockMainLogic>().state;
|
final state = Get.find<LockMainLogic>().state;
|
||||||
|
|
||||||
Future<void> getHttpData() async {
|
Future<void> getHttpData() async {
|
||||||
LockListInfoGroupEntity? lockListInfoGroupEntity = await Storage.getLockMainListData();
|
LockListInfoGroupEntity? lockListInfoGroupEntity =
|
||||||
|
await Storage.getLockMainListData();
|
||||||
// Get.log("lockListInfoGroupEntity:${lockListInfoGroupEntity!.groupList!.length}");
|
// Get.log("lockListInfoGroupEntity:${lockListInfoGroupEntity!.groupList!.length}");
|
||||||
if (lockListInfoGroupEntity != null) {
|
if (lockListInfoGroupEntity != null) {
|
||||||
var localLockListInfoGroupEntity = lockListInfoGroupEntity;
|
var localLockListInfoGroupEntity = lockListInfoGroupEntity;
|
||||||
@ -71,44 +72,49 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
Widget child = EasyRefreshTool(
|
||||||
backgroundColor: const Color(0xFFF5F5F5),
|
onRefresh: () {
|
||||||
appBar: widget.showAppBar
|
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||||
? TitleAppBar(
|
// 更新状态的代码
|
||||||
barTitle: F.navTitle,
|
logic.pageNo = 1;
|
||||||
haveBack: false,
|
getHttpData();
|
||||||
haveOtherLeftWidget: true,
|
});
|
||||||
leftWidget: Builder(
|
},
|
||||||
builder: (context) => IconButton(
|
// child: getDataReturnUI(state.dataLength.value));
|
||||||
icon: Image.asset(
|
child: getDataReturnUI(state.dataLength.value));
|
||||||
"images/main/mainLeft_menu_icon.png",
|
if (widget.showAppBar || widget.showDrawer) {
|
||||||
color: Colors.white,
|
child = Scaffold(
|
||||||
width: 44.w,
|
backgroundColor: const Color(0xFFF5F5F5),
|
||||||
height: 44.w,
|
appBar: widget.showAppBar
|
||||||
),
|
? TitleAppBar(
|
||||||
onPressed: () {
|
barTitle: F.navTitle,
|
||||||
Scaffold.of(context).openDrawer();
|
haveBack: false,
|
||||||
},
|
haveOtherLeftWidget: true,
|
||||||
)),
|
leftWidget: Builder(
|
||||||
backgroundColor: AppColors.mainColor,
|
builder: (context) => IconButton(
|
||||||
)
|
icon: Image.asset(
|
||||||
: null,
|
"images/main/mainLeft_menu_icon.png",
|
||||||
drawer: widget.showDrawer
|
color: Colors.white,
|
||||||
? Drawer(
|
width: 44.w,
|
||||||
width: 1.sw / 3 * 2,
|
height: 44.w,
|
||||||
child: const StarLockMinePage(),
|
),
|
||||||
)
|
onPressed: () {
|
||||||
: null,
|
Scaffold.of(context).openDrawer();
|
||||||
body: EasyRefreshTool(
|
},
|
||||||
onRefresh: () {
|
)),
|
||||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
backgroundColor: AppColors.mainColor,
|
||||||
// 更新状态的代码
|
)
|
||||||
logic.pageNo = 1;
|
: null,
|
||||||
getHttpData();
|
drawer: widget.showDrawer
|
||||||
});
|
? Drawer(
|
||||||
},
|
width: 1.sw / 3 * 2,
|
||||||
child: getDataReturnUI(state.dataLength.value)),
|
child: const StarLockMinePage(),
|
||||||
);
|
)
|
||||||
|
: null,
|
||||||
|
body: child,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getDataReturnUI(int type) {
|
Widget getDataReturnUI(int type) {
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_page.dart';
|
||||||
import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_state.dart';
|
import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_state.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
@ -12,6 +15,29 @@ class LockMainXHJLogic extends BaseGetXController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//打开设备弹窗
|
||||||
|
void openEquipment() {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: Get.context!,
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
builder: (context) {
|
||||||
|
return ClipRRect(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(16.r),
|
||||||
|
topRight: Radius.circular(16.r),
|
||||||
|
),
|
||||||
|
child: SizedBox(
|
||||||
|
height: Get.height * 0.7,
|
||||||
|
child: StarLockMainPage(
|
||||||
|
showAppBar: false,
|
||||||
|
showDrawer: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|||||||
@ -41,14 +41,25 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
|
|||||||
builder: (LockMainXHJLogic logic) {
|
builder: (LockMainXHJLogic logic) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: const Color(0xFFF5F5F5),
|
backgroundColor: const Color(0xFFF5F5F5),
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
onPressed: () {
|
||||||
|
logic.openEquipment();
|
||||||
|
},
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
tooltip: TranslationLoader.lanKeys!.device!.tr,
|
||||||
|
child: const Icon(
|
||||||
|
Icons.key,
|
||||||
|
color: AppColors.darkGrayTextColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
bottom: false,
|
bottom: false,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
pageView(
|
pageView(
|
||||||
widget: StarLockMainPage(
|
widget: LockMallPage(
|
||||||
showAppBar: false,
|
showAppBar: false,
|
||||||
showDrawer: false,
|
|
||||||
),
|
),
|
||||||
logic: logic,
|
logic: logic,
|
||||||
index: 0,
|
index: 0,
|
||||||
@ -60,20 +71,13 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
|
|||||||
logic: logic,
|
logic: logic,
|
||||||
index: 1,
|
index: 1,
|
||||||
),
|
),
|
||||||
pageView(
|
|
||||||
widget: LockMallPage(
|
|
||||||
showAppBar: false,
|
|
||||||
),
|
|
||||||
logic: logic,
|
|
||||||
index: 2,
|
|
||||||
),
|
|
||||||
pageView(
|
pageView(
|
||||||
widget: MinePersonInfoPage(
|
widget: MinePersonInfoPage(
|
||||||
showAppBar: false,
|
showAppBar: false,
|
||||||
showAbout: true,
|
showAbout: true,
|
||||||
),
|
),
|
||||||
logic: logic,
|
logic: logic,
|
||||||
index: 3,
|
index: 2,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -93,26 +97,18 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
|
|||||||
top: false,
|
top: false,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
// navigationBarItem(Icons.start, '场景', false, () {
|
navigationBarItem(Icons.shopping_cart, '商城'.tr, logic, 0,
|
||||||
// logic.setIndex(0);
|
() {
|
||||||
// }),
|
|
||||||
|
|
||||||
navigationBarItem(Icons.devices,
|
|
||||||
TranslationLoader.lanKeys!.device!.tr, logic, 0, () {
|
|
||||||
logic.setIndex(0);
|
logic.setIndex(0);
|
||||||
}),
|
}),
|
||||||
navigationBarItem(Icons.message,
|
navigationBarItem(Icons.message,
|
||||||
TranslationLoader.lanKeys!.message!.tr, logic, 1, () {
|
TranslationLoader.lanKeys!.message!.tr, logic, 1, () {
|
||||||
logic.setIndex(1);
|
logic.setIndex(1);
|
||||||
}),
|
}),
|
||||||
navigationBarItem(Icons.shopping_cart, '商城'.tr, logic, 2,
|
navigationBarItem(Icons.account_circle, '我的'.tr, logic, 2,
|
||||||
() {
|
() {
|
||||||
logic.setIndex(2);
|
logic.setIndex(2);
|
||||||
}),
|
}),
|
||||||
navigationBarItem(Icons.account_circle, '我的'.tr, logic, 3,
|
|
||||||
() {
|
|
||||||
logic.setIndex(3);
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -52,12 +52,54 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
|||||||
AMapFlutterLocation.setApiKey(F.aMapKey.androidKey, F.aMapKey.iosKey);
|
AMapFlutterLocation.setApiKey(F.aMapKey.androidKey, F.aMapKey.iosKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Future<void> requestPermission() async {
|
||||||
|
// final status = await Permission.location.request();
|
||||||
|
// print("Permission.location.request()=status:$status");
|
||||||
|
// permissionStatus = status;
|
||||||
|
// if(Platform.isIOS){
|
||||||
|
// _setLocationOption();
|
||||||
|
// requestIOSLocation();
|
||||||
|
// }
|
||||||
|
// switch (status) {
|
||||||
|
// case PermissionStatus.denied:
|
||||||
|
// // print("拒绝");
|
||||||
|
// break;
|
||||||
|
// case PermissionStatus.granted:
|
||||||
|
// if(Platform.isIOS){
|
||||||
|
// // _setLocationOption();
|
||||||
|
// // requestIOSLocation();
|
||||||
|
// }else{
|
||||||
|
// requestAndroidLocation();
|
||||||
|
// location.startLocation();
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// case PermissionStatus.limited:
|
||||||
|
// // print("限制");
|
||||||
|
// break;
|
||||||
|
// case PermissionStatus.permanentlyDenied:
|
||||||
|
// // print("永久的否认");
|
||||||
|
// break;
|
||||||
|
// case PermissionStatus.provisional:
|
||||||
|
// // print("临时");
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// // print("其他状态");
|
||||||
|
// // requestLocation();
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
Future<void> requestPermission() async {
|
Future<void> requestPermission() async {
|
||||||
final status = await PermissionDialog.request(Permission.location);
|
final status = await PermissionDialog.request(Permission.location);
|
||||||
if (Platform.isIOS || status) {
|
if(Platform.isIOS){
|
||||||
_setLocationOption();
|
_setLocationOption();
|
||||||
requestIOSLocation();
|
requestIOSLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Platform.isIOS || status) {
|
||||||
|
requestAndroidLocation();
|
||||||
|
location.startLocation();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> requestAndroidLocation() async {
|
Future<void> requestAndroidLocation() async {
|
||||||
|
|||||||
@ -155,7 +155,8 @@ class NearbyLockLogic extends BaseGetXController {
|
|||||||
// 产品名称
|
// 产品名称
|
||||||
var model = reply.data.sublist(24, 44);
|
var model = reply.data.sublist(24, 44);
|
||||||
var modelStr = utf8String(model);
|
var modelStr = utf8String(model);
|
||||||
state.lockInfo["model"] = modelStr;
|
// state.lockInfo["model"] = modelStr;
|
||||||
|
state.lockInfo["model"] = "JL-BLE-01";
|
||||||
// Get.log("model:$model modelStr:$modelStr modelStr:${modelStr.length}");
|
// Get.log("model:$model modelStr:$modelStr modelStr:${modelStr.length}");
|
||||||
|
|
||||||
// 软件版本
|
// 软件版本
|
||||||
|
|||||||
@ -673,6 +673,15 @@ class ApiProvider extends BaseProvider {
|
|||||||
'autoLockSecond': autoLockSecond,
|
'autoLockSecond': autoLockSecond,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
/// 更新网络信息 配网之后把网络信息提交到服务器保存
|
||||||
|
Future<Response> updateNetworkInfo(int lockId, String network) =>
|
||||||
|
post(
|
||||||
|
updateLockSettingUrl.toUrl,
|
||||||
|
jsonEncode({
|
||||||
|
'lockId': lockId,
|
||||||
|
'network': network,
|
||||||
|
}));
|
||||||
|
|
||||||
// 锁声音
|
// 锁声音
|
||||||
Future<Response> setLockSoundData(
|
Future<Response> setLockSoundData(
|
||||||
int lockId, int lockSound, int lockSoundVolume) =>
|
int lockId, int lockSound, int lockSoundVolume) =>
|
||||||
|
|||||||
@ -705,6 +705,17 @@ class ApiRepository {
|
|||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新网络信息 配网之后把网络信息提交到服务器保存
|
||||||
|
Future<LoginEntity> updateNetworkInfo({
|
||||||
|
required int lockId,
|
||||||
|
required String network,
|
||||||
|
}) async {
|
||||||
|
final res = await apiProvider.updateNetworkInfo(lockId, network);
|
||||||
|
return LoginEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 锁声音
|
// 锁声音
|
||||||
Future<LoginEntity> setLockSound({
|
Future<LoginEntity> setLockSound({
|
||||||
required int lockId,
|
required int lockId,
|
||||||
|
|||||||
@ -175,4 +175,20 @@ class DateTool {
|
|||||||
// print('dateTime:$dateTime now:$now The difference is $days days.');
|
// print('dateTime:$dateTime now:$now The difference is $days days.');
|
||||||
return days;
|
return days;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 根据循环的循环周期转化为对应的整型(Bit0 -- 6 置位分别代表周日 -- 周六)
|
||||||
|
int accordingTheCycleIntoTheCorrespondingNumber(List weekDay){
|
||||||
|
var weekStr = "00000000";
|
||||||
|
// print("state.weekDay.value:$weekDay");
|
||||||
|
for (var day in weekDay) {
|
||||||
|
int index = day % 7; // 将周日的索引转换为 0
|
||||||
|
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
|
}
|
||||||
|
// 倒序 weekStr
|
||||||
|
weekStr = weekStr.split('').reversed.join('');
|
||||||
|
int weekRound = int.parse(weekStr, radix: 2);
|
||||||
|
// print("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
||||||
|
return weekRound;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -4,18 +4,21 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
|
|
||||||
class FlavorsImg extends StatelessWidget {
|
class FlavorsImg extends StatelessWidget {
|
||||||
FlavorsImg({required this.child, key});
|
FlavorsImg({required this.child, this.black = false, key});
|
||||||
|
|
||||||
|
bool black;
|
||||||
Widget child;
|
Widget child;
|
||||||
|
|
||||||
ColorFilterGenerator myFilter = ColorFilterGenerator(name: "xhj", filters: [
|
ColorFilterGenerator myFilter =
|
||||||
// ColorFilterAddons.addictiveColor(1, 22, 93),
|
ColorFilterGenerator(name: "xhj", filters: []);
|
||||||
ColorFilterAddons.addictiveColor(1, 22, 93),
|
|
||||||
// ColorFilterAddons.grayscale(),z
|
|
||||||
]);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
myFilter = ColorFilterGenerator(name: "xhj", filters: [
|
||||||
|
black
|
||||||
|
? ColorFilterAddons.addictiveColor(-255, -255, -255)
|
||||||
|
: ColorFilterAddons.addictiveColor(1, 22, 93),
|
||||||
|
]);
|
||||||
if (F.appFlavor != Flavor.xhj) {
|
if (F.appFlavor != Flavor.xhj) {
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,8 +34,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# 1.0.28+2024041702:打包给欧阳回归测试
|
# 1.0.28+2024041702:打包给欧阳回归测试
|
||||||
# 1.0.27+2024041702 打包星星锁提审华为
|
# 1.0.27+2024041702 打包星星锁提审华为
|
||||||
# 1.0.27+2024041703 打包星星锁提审ios
|
# 1.0.27+2024041703 打包星星锁提审ios
|
||||||
|
# 1.0.27+2024042204 打包星星锁提审ios与 android
|
||||||
|
|
||||||
version: 1.0.27+2024041803
|
version: 1.0.27+2024042204
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user