fix:猫眼协议调整为蓝牙发送
This commit is contained in:
parent
1c74b54cd4
commit
88af212844
@ -1,3 +1,4 @@
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/blue/blue_manage.dart';
|
||||
@ -11,6 +12,8 @@ import 'package:star_lock/talk/starChart/star_chart_manage.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
|
||||
import '../../../../../blue/sender_manage.dart';
|
||||
|
||||
class CatEyeCustomModeLogic extends BaseGetXController {
|
||||
final CatEyeCustomModeState state = CatEyeCustomModeState();
|
||||
|
||||
@ -42,16 +45,50 @@ class CatEyeCustomModeLogic extends BaseGetXController {
|
||||
state.catEyeConfigData.value.catEyeModeConfig!.realTimeMode == 0
|
||||
? '发生事件时查看'.tr
|
||||
: '实时查看'.tr;
|
||||
_getConfigAndGenerateBleData();
|
||||
updateCatEyeSetConfig();
|
||||
await _getConfigAndGenerateBleData();
|
||||
await updateCatEyeSetConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
await _getConfigAndGenerateBleData();
|
||||
updateCatEyeSetConfig();
|
||||
await updateCatEyeSetConfig();
|
||||
return entity;
|
||||
}
|
||||
|
||||
_sendBlueMessage(SetSupportFunctionsWithParametersCommand command,
|
||||
List<int> config) async {
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||
(BluetoothConnectionState connectionState) async {
|
||||
if (connectionState == BluetoothConnectionState.connected) {
|
||||
final List<String>? privateKey =
|
||||
await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList =
|
||||
changeStringListToIntList(privateKey!);
|
||||
|
||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
final List<String>? publicKey =
|
||||
await Storage.getStringList(saveBluePublicKey);
|
||||
final List<int> getPublicKeyList =
|
||||
changeStringListToIntList(publicKey!);
|
||||
IoSenderManage.setSupportFunctionsWithParametersCommand(
|
||||
keyID: command.keyID,
|
||||
userID: command.userID,
|
||||
featureBit: command.featureBit,
|
||||
featureParaLength: config.length,
|
||||
featureData: config,
|
||||
token: getTokenList,
|
||||
needAuthor: 1,
|
||||
publicKey: getPublicKeyList,
|
||||
privateKey: getPrivateKeyList);
|
||||
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//设置猫眼工作模式 0-有人出现时录像 1-人体侦测距离
|
||||
void updateCatEyeModeConfig(int clickIndex) async {
|
||||
var entity = await ApiRepository.to.updateCatEyeModeConfig(
|
||||
@ -150,7 +187,7 @@ class CatEyeCustomModeLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
/// 更新锁板上的猫眼配置
|
||||
void updateCatEyeSetConfig() async {
|
||||
Future<void> updateCatEyeSetConfig() async {
|
||||
final int operatingMode = state.catEyeConfig.value.catEyeMode ?? 1; // 自定义模式
|
||||
final int isAllDay = state.catEyeConfig.value.recordMode ?? 1; // 是否是全天
|
||||
final int startTime =
|
||||
@ -207,11 +244,14 @@ class CatEyeCustomModeLogic extends BaseGetXController {
|
||||
privateKey: getPrivateKeyList,
|
||||
);
|
||||
final packageData = command.packageData();
|
||||
|
||||
/// 发送星图
|
||||
StartChartManage().sendBleMessage(
|
||||
bluetoothDeviceName: BlueManage().connectDeviceName,
|
||||
bleStructData: packageData,
|
||||
);
|
||||
// StartChartManage().sendBleMessage(
|
||||
// bluetoothDeviceName: BlueManage().connectDeviceName,
|
||||
// bleStructData: packageData,
|
||||
// );
|
||||
|
||||
await _sendBlueMessage(command, config);
|
||||
}
|
||||
|
||||
// 根据提供的参数生成配置列表
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/blue/blue_manage.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_setSupportFunctionsWithParameters.dart';
|
||||
import 'package:star_lock/blue/io_reply.dart';
|
||||
import 'package:star_lock/blue/io_tool/io_tool.dart';
|
||||
import 'package:star_lock/blue/io_tool/manager_event_bus.dart';
|
||||
import 'package:star_lock/blue/sender_manage.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -17,6 +22,66 @@ import 'catEyeSet_state.dart';
|
||||
class CatEyeSetLogic extends BaseGetXController {
|
||||
final CatEyeSetState state = CatEyeSetState();
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
_initReplySubscription();
|
||||
}
|
||||
|
||||
// 获取解析后的数据
|
||||
late StreamSubscription<Reply> _replySubscription;
|
||||
|
||||
void _initReplySubscription() {
|
||||
_replySubscription =
|
||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
||||
// 设置支持功能解析(带参数)
|
||||
if (reply is SetSupportFunctionsWithParametersReply) {
|
||||
_replySetSupportFunctionsWithParameters(reply);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 设置支持功能解析
|
||||
Future<void> _replySetSupportFunctionsWithParameters(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
dismissEasyLoading();
|
||||
switch (state.settingOptions.value) {
|
||||
case 1: //自动亮屏
|
||||
{
|
||||
updateAutoLightScreenConfig();
|
||||
}
|
||||
break;
|
||||
case 2: //逗留警告
|
||||
{
|
||||
updateStayWarnConfig();
|
||||
}
|
||||
break;
|
||||
case 3: //异常警告
|
||||
{
|
||||
updateAbnormalWarnConfig();
|
||||
}
|
||||
break;
|
||||
case 4: //设置亮屏持续时间
|
||||
{
|
||||
updateLightScreenTimeConfig();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//设置自动亮屏
|
||||
Future<void> updateAutoLightScreenConfig() async {
|
||||
final VersionUndateEntity entity =
|
||||
@ -139,14 +204,13 @@ class CatEyeSetLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
}
|
||||
await _getConfigAndGenerateBleData();
|
||||
updateCatEyeSetConfig();
|
||||
// 更新state中的猫眼设置
|
||||
await _updateCatEyeSetByState();
|
||||
return entity;
|
||||
}
|
||||
|
||||
_getConfigAndGenerateBleData() async {
|
||||
// 假设 state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0].catEyeMode 是一个整数
|
||||
|
||||
// 更新state中的猫眼设置
|
||||
_updateCatEyeSetByState() async {
|
||||
int originalCatEyeMode = 0;
|
||||
int recordMode = 0;
|
||||
int recordStartTime = 0;
|
||||
@ -226,8 +290,8 @@ class CatEyeSetLogic extends BaseGetXController {
|
||||
state.catEyeConfig.refresh();
|
||||
}
|
||||
|
||||
/// 更新锁板上的猫眼配置
|
||||
void updateCatEyeSetConfig() async {
|
||||
/// 构建蓝牙设置命令
|
||||
List<int> _buildCatEyeSetBlueMessage() {
|
||||
final int operatingMode = state.catEyeConfig.value.catEyeMode ?? 1; // 自定义模式
|
||||
final int isAllDay = state.catEyeConfig.value.recordMode ?? 1; // 是否是全天
|
||||
final int startTime =
|
||||
@ -261,42 +325,7 @@ class CatEyeSetLogic extends BaseGetXController {
|
||||
stayWarning: stayWarning,
|
||||
exceptionWarning: exceptionWarning,
|
||||
);
|
||||
final List<String>? privateKey =
|
||||
await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
final List<String>? publicKey =
|
||||
await Storage.getStringList(saveBluePublicKey);
|
||||
final List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||
final userId = await Storage.getUid();
|
||||
final command = SetSupportFunctionsWithParametersCommand(
|
||||
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
||||
userID: userId,
|
||||
featureBit: 64,
|
||||
featureParaLength: config.length,
|
||||
featureData: config,
|
||||
token: getTokenList,
|
||||
needAuthor: 1,
|
||||
publicKey: getPublicKeyList,
|
||||
privateKey: getPrivateKeyList,
|
||||
);
|
||||
final packageData = command.packageData();
|
||||
|
||||
// 将 List<int> 转换为十六进制字符串
|
||||
String hexString = packageData
|
||||
.map((byte) => byte.toRadixString(16).padLeft(2, '0'))
|
||||
.join(' ');
|
||||
|
||||
AppLog.log('发送透传猫眼设置: $hexString');
|
||||
|
||||
/// 发送星图
|
||||
StartChartManage().sendBleMessage(
|
||||
bluetoothDeviceName: BlueManage().connectDeviceName,
|
||||
bleStructData: packageData,
|
||||
);
|
||||
return config;
|
||||
}
|
||||
|
||||
// 根据提供的参数生成配置列表
|
||||
@ -403,4 +432,70 @@ class CatEyeSetLogic extends BaseGetXController {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void updateSettingOptions(int clickIndex, value) {
|
||||
switch (clickIndex) {
|
||||
case 1: //自动亮屏
|
||||
{
|
||||
state.isAutoBright.value = value;
|
||||
state.settingOptions.value = 1;
|
||||
state.catEyeConfig.value.autoLightScreen = value == true ? 1 : 0;
|
||||
}
|
||||
break;
|
||||
case 2: //逗留警告
|
||||
{
|
||||
state.isStayWarning.value = value;
|
||||
state.settingOptions.value = 2;
|
||||
state.catEyeConfig.value.stayWarn = value == true ? 1 : 0;
|
||||
}
|
||||
break;
|
||||
case 3: //异常警告
|
||||
{
|
||||
state.isExceptionWarning.value = value;
|
||||
state.settingOptions.value = 3;
|
||||
state.catEyeConfig.value.abnormalWarn = value == true ? 1 : 0;
|
||||
}
|
||||
break;
|
||||
case 4: //设置亮屏持续时间
|
||||
{
|
||||
state.isExceptionWarning.value = value;
|
||||
state.settingOptions.value = 4;
|
||||
state.catEyeConfig.value.autoLightScreenTime =
|
||||
_handleGetIntNumber(state.selectBrightDuration.value);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
final message = _buildCatEyeSetBlueMessage();
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||
(BluetoothConnectionState connectionState) async {
|
||||
if (connectionState == BluetoothConnectionState.connected) {
|
||||
final List<String>? privateKey =
|
||||
await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList =
|
||||
changeStringListToIntList(privateKey!);
|
||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||
final List<String>? publicKey =
|
||||
await Storage.getStringList(saveBluePublicKey);
|
||||
final List<int> getPublicKeyList =
|
||||
changeStringListToIntList(publicKey!);
|
||||
final userId = await Storage.getUid();
|
||||
IoSenderManage.setSupportFunctionsWithParametersCommand(
|
||||
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
||||
userID: userId,
|
||||
featureBit: 64,
|
||||
featureParaLength: message.length,
|
||||
featureData: message,
|
||||
token: getTokenList,
|
||||
needAuthor: 1,
|
||||
publicKey: getPublicKeyList,
|
||||
privateKey: getPrivateKeyList);
|
||||
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,28 +118,7 @@ class _CatEyeSetPageState extends State<CatEyeSetPage> {
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: isCheck,
|
||||
onChanged: (bool value) {
|
||||
switch (clickIndex) {
|
||||
case 1: //自动亮屏
|
||||
{
|
||||
state.isAutoBright.value = value;
|
||||
logic.updateAutoLightScreenConfig();
|
||||
}
|
||||
break;
|
||||
case 2: //逗留警告
|
||||
{
|
||||
state.isStayWarning.value = value;
|
||||
logic.updateStayWarnConfig();
|
||||
}
|
||||
break;
|
||||
case 3: //异常警告
|
||||
{
|
||||
state.isExceptionWarning.value = value;
|
||||
logic.updateAbnormalWarnConfig();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
logic.updateSettingOptions(clickIndex, value);
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -156,7 +135,7 @@ class _CatEyeSetPageState extends State<CatEyeSetPage> {
|
||||
chooseCallback: (int value) {
|
||||
state.selectBrightDuration.value =
|
||||
state.brightDurationTimeList[value];
|
||||
logic.updateLightScreenTimeConfig();
|
||||
logic.updateSettingOptions(4, true);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_rx/get_rx.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
||||
|
||||
class CatEyeSetState {
|
||||
@ -38,6 +39,7 @@ class CatEyeSetState {
|
||||
RxBool isExceptionWarning = false.obs; //异常警告
|
||||
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
||||
RxString selectCatEyeWorkMode = ''.obs; //猫眼工作模式
|
||||
RxInt settingOptions = 0.obs; // 设置项
|
||||
final String settingSuccess = '设置成功'.tr;
|
||||
|
||||
|
||||
|
||||
@ -1,11 +1,16 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/blue/blue_manage.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_setSupportFunctionsWithParameters.dart';
|
||||
import 'package:star_lock/blue/io_reply.dart';
|
||||
import 'package:star_lock/blue/io_tool/io_tool.dart';
|
||||
import 'package:star_lock/blue/io_tool/manager_event_bus.dart';
|
||||
import 'package:star_lock/blue/sender_manage.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
||||
@ -18,6 +23,39 @@ import 'package:star_lock/versionUndate/versionUndate_entity.dart';
|
||||
class CatEyeWorkModeLogic extends BaseGetXController {
|
||||
final CatEyeWorkModeState state = CatEyeWorkModeState();
|
||||
|
||||
final CatEyeSetState catEyeSetState = Get.find<CatEyeSetLogic>().state;
|
||||
|
||||
// 获取解析后的数据
|
||||
late StreamSubscription<Reply> _replySubscription;
|
||||
|
||||
void _initReplySubscription() {
|
||||
_replySubscription =
|
||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
||||
// 设置支持功能解析(带参数)
|
||||
if (reply is SetSupportFunctionsWithParametersReply) {
|
||||
_replySetSupportFunctionsWithParameters(reply);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 设置支持功能解析
|
||||
Future<void> _replySetSupportFunctionsWithParameters(Reply reply) async {
|
||||
final int status = reply.data[2];
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
dismissEasyLoading();
|
||||
updateCatEyeModeConfig();
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//设置猫眼工作模式
|
||||
Future<void> updateCatEyeModeConfig() async {
|
||||
final VersionUndateEntity entity =
|
||||
@ -60,13 +98,12 @@ class CatEyeWorkModeLogic extends BaseGetXController {
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('设置成功'.tr);
|
||||
getLockSettingInfoData();
|
||||
|
||||
updateCatEyeSetConfig();
|
||||
}
|
||||
}
|
||||
|
||||
/// 处理蓝牙数据
|
||||
void _handlerBleData() {
|
||||
void _sendBlueMessage(
|
||||
SetSupportFunctionsWithParametersCommand command, List<int> config) {
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||
(BluetoothConnectionState connectionState) async {
|
||||
if (connectionState == BluetoothConnectionState.connected) {
|
||||
@ -82,15 +119,12 @@ class CatEyeWorkModeLogic extends BaseGetXController {
|
||||
await Storage.getStringList(saveBluePublicKey);
|
||||
final List<int> getPublicKeyList =
|
||||
changeStringListToIntList(publicKey!);
|
||||
|
||||
List<int> featureData = [];
|
||||
|
||||
IoSenderManage.setSupportFunctionsWithParametersCommand(
|
||||
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
||||
userID: await Storage.getUid(),
|
||||
featureBit: 33,
|
||||
featureParaLength: 1,
|
||||
featureData: featureData,
|
||||
keyID: command.keyID,
|
||||
userID: command.userID,
|
||||
featureBit: command.featureBit,
|
||||
featureParaLength: config.length,
|
||||
featureData: config,
|
||||
token: getTokenList,
|
||||
needAuthor: 1,
|
||||
publicKey: getPublicKeyList,
|
||||
@ -102,6 +136,8 @@ class CatEyeWorkModeLogic extends BaseGetXController {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取锁设置信息
|
||||
Future<void> getLockSettingInfoData() async {
|
||||
final LockSetInfoEntity entity =
|
||||
@ -256,20 +292,8 @@ class CatEyeWorkModeLogic extends BaseGetXController {
|
||||
publicKey: getPublicKeyList,
|
||||
privateKey: getPrivateKeyList,
|
||||
);
|
||||
final packageData = command.packageData();
|
||||
|
||||
// 将 List<int> 转换为十六进制字符串
|
||||
String hexString = packageData
|
||||
.map((byte) => byte.toRadixString(16).padLeft(2, '0'))
|
||||
.join(' ');
|
||||
|
||||
AppLog.log('catEye set: $hexString');
|
||||
|
||||
/// 发送星图
|
||||
StartChartManage().sendBleMessage(
|
||||
bluetoothDeviceName: BlueManage().connectDeviceName,
|
||||
bleStructData: packageData,
|
||||
);
|
||||
_sendBlueMessage(command, config);
|
||||
}
|
||||
|
||||
// 根据提供的参数生成配置列表
|
||||
@ -376,4 +400,35 @@ class CatEyeWorkModeLogic extends BaseGetXController {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void updateCustomModeConfig() {
|
||||
state.catEyeConfig.value.recordMode =
|
||||
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig!.isNotEmpty
|
||||
? state.catEyeConfigData.value.catEyeModeConfig?.recordMode
|
||||
: 0;
|
||||
state.catEyeConfig.value.recordStartTime =
|
||||
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig!.isNotEmpty
|
||||
? state.catEyeConfigData.value.catEyeModeConfig?.recordStartTime
|
||||
: 0;
|
||||
state.catEyeConfig.value.recordEndTime =
|
||||
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig!.isNotEmpty
|
||||
? state.catEyeConfigData.value.catEyeModeConfig?.recordEndTime
|
||||
: 0;
|
||||
state.catEyeConfig.value.recordTime =
|
||||
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig!.isNotEmpty
|
||||
? _handleGetIntNumber(
|
||||
state.catEyeConfigData.value.catEyeModeConfig?.recordTime ?? '')
|
||||
: 0;
|
||||
state.catEyeConfig.value.detectionDistance = state
|
||||
.lockSetInfoData.value.lockSettingInfo!.catEyeConfig!.isNotEmpty
|
||||
? _handleDetectionDistance(
|
||||
state.catEyeConfigData.value.catEyeModeConfig?.detectionDistance ??
|
||||
'')
|
||||
: 0;
|
||||
state.catEyeConfig.value.realTimeMode =
|
||||
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig!.isNotEmpty
|
||||
? state.catEyeConfigData.value.catEyeModeConfig?.realTimeMode!
|
||||
: 0;
|
||||
updateCatEyeSetConfig();
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,6 +140,7 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
|
||||
for (int i = 0; i < state.boolList.value.length; i++) {
|
||||
if (clickIndex == i) {
|
||||
state.boolList.value[clickIndex] = true;
|
||||
logic.updateCustomModeConfig();
|
||||
logic.updateCatEyeModeConfig();
|
||||
} else {
|
||||
state.boolList.value[i] = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user