Merge branch 'develop_sky' into 'canary_release'

fix:恢复原有ci

See merge request StarlockTeam/app-starlock!96
This commit is contained in:
李仪 2025-05-19 02:16:11 +00:00
commit 0fffc2c4b2
2 changed files with 44 additions and 34 deletions

View File

@ -1,4 +1,3 @@
import 'dart:async';
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
@ -27,20 +26,25 @@ class BurglarAlarmLogic extends BaseGetXController{
antiPrySwitch: state.burglarAlarmEnable.value == 1 ? 0 : 1, // 1-2-;
);
if (entity.errorCode!.codeIsSuccessful) {
// eventBus.fire(RefreshLockListInfoDataEvent());
eventBus.fire(RefreshLockListInfoDataEvent());
state.burglarAlarmEnable.value = state.burglarAlarmEnable.value == 1 ? 0 : 1;
state.lockSetInfoData.value.lockSettingInfo!.antiPrySwitch = state.burglarAlarmEnable.value;
state.burglarAlarmEnable.value =
state.burglarAlarmEnable.value == 1 ? 0 : 1;
state.lockSetInfoData.value.lockSettingInfo!.antiPrySwitch =
state.burglarAlarmEnable.value;
showToast('操作成功'.tr, something: () {
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
eventBus
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
});
}
}
//
late StreamSubscription<Reply> _replySubscription;
void _initReplySubscription() {
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
_replySubscription =
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
if (reply is SetSupportFunctionsNoParametersReply) {
_replySetSupportFunctionsWithParameters(reply);
}
@ -101,16 +105,21 @@ class BurglarAlarmLogic extends BaseGetXController{
dismissEasyLoading();
state.sureBtnState.value = 0;
});
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) 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>? 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 List<String>? publicKey =
await Storage.getStringList(saveBluePublicKey);
final List<int> getPublicKeyList =
changeStringListToIntList(publicKey!);
IoSenderManage.setSupportFunctionsNoParametersCommand(
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
@ -120,7 +129,8 @@ class BurglarAlarmLogic extends BaseGetXController{
token: getTokenList,
needAuthor: 1,
publicKey: getPublicKeyList,
privateKey: getPrivateKeyList);
privateKey: getPrivateKeyList,
);
} else if (connectionState == BluetoothConnectionState.disconnected) {
dismissEasyLoading();
cancelBlueConnetctToastTimer();
@ -152,5 +162,4 @@ class BurglarAlarmLogic extends BaseGetXController{
_replySubscription.cancel();
}
}

View File

@ -21,7 +21,8 @@ class RemoteUnlockingLogic extends BaseGetXController {
RemoteUnlockingState state = RemoteUnlockingState();
void remoteUnlockingOpenOrClose() async {
final LoginEntity entity = await ApiRepository.to.remoteUnlockingOpenOrClose(
final LoginEntity entity = await ApiRepository.to
.remoteUnlockingOpenOrClose(
lockId: state.lockSetInfoData.value.lockId!,
remoteUnlock: state.remoteEnable.value == 1 ? 0 : 1);
if (entity.errorCode!.codeIsSuccessful) {
@ -32,7 +33,6 @@ class RemoteUnlockingLogic extends BaseGetXController {
state.remoteEnable.value;
eventBus
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
eventBus.fire(RefreshLockListInfoDataEvent());
eventBus.fire(LockSetChangeSetRefreshLockDetailWithType(
5,
state.lockSetInfoData.value.lockSettingInfo!.remoteUnlock!
@ -44,6 +44,7 @@ class RemoteUnlockingLogic extends BaseGetXController {
//
late StreamSubscription<Reply> _replySubscription;
void _initReplySubscription() {
_replySubscription =
EventBusManager().eventBus!.on<Reply>().listen((reply) {