Merge branch 'develop_sky' into 'canary_release'
fix:恢复原有ci See merge request StarlockTeam/app-starlock!96
This commit is contained in:
commit
0fffc2c4b2
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
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-关闭;
|
antiPrySwitch: state.burglarAlarmEnable.value == 1 ? 0 : 1, // 1-开启、2-关闭;
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
// eventBus.fire(RefreshLockListInfoDataEvent());
|
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||||
|
|
||||||
state.burglarAlarmEnable.value = state.burglarAlarmEnable.value == 1 ? 0 : 1;
|
state.burglarAlarmEnable.value =
|
||||||
state.lockSetInfoData.value.lockSettingInfo!.antiPrySwitch = state.burglarAlarmEnable.value;
|
state.burglarAlarmEnable.value == 1 ? 0 : 1;
|
||||||
|
state.lockSetInfoData.value.lockSettingInfo!.antiPrySwitch =
|
||||||
|
state.burglarAlarmEnable.value;
|
||||||
showToast('操作成功'.tr, something: () {
|
showToast('操作成功'.tr, something: () {
|
||||||
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
eventBus
|
||||||
|
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取解析后的数据
|
// 获取解析后的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
_replySubscription =
|
||||||
|
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
||||||
if (reply is SetSupportFunctionsNoParametersReply) {
|
if (reply is SetSupportFunctionsNoParametersReply) {
|
||||||
_replySetSupportFunctionsWithParameters(reply);
|
_replySetSupportFunctionsWithParameters(reply);
|
||||||
}
|
}
|
||||||
@ -101,16 +105,21 @@ class BurglarAlarmLogic extends BaseGetXController{
|
|||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
});
|
});
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
|
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||||
|
(BluetoothConnectionState connectionState) async {
|
||||||
if (connectionState == BluetoothConnectionState.connected) {
|
if (connectionState == BluetoothConnectionState.connected) {
|
||||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey =
|
||||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
final List<int> getPrivateKeyList =
|
||||||
|
changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
final List<String>? publicKey = await Storage.getStringList(saveBluePublicKey);
|
final List<String>? publicKey =
|
||||||
final List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
await Storage.getStringList(saveBluePublicKey);
|
||||||
|
final List<int> getPublicKeyList =
|
||||||
|
changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
IoSenderManage.setSupportFunctionsNoParametersCommand(
|
IoSenderManage.setSupportFunctionsNoParametersCommand(
|
||||||
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
||||||
@ -120,7 +129,8 @@ class BurglarAlarmLogic extends BaseGetXController{
|
|||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
needAuthor: 1,
|
needAuthor: 1,
|
||||||
publicKey: getPublicKeyList,
|
publicKey: getPublicKeyList,
|
||||||
privateKey: getPrivateKeyList);
|
privateKey: getPrivateKeyList,
|
||||||
|
);
|
||||||
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
@ -152,5 +162,4 @@ class BurglarAlarmLogic extends BaseGetXController{
|
|||||||
|
|
||||||
_replySubscription.cancel();
|
_replySubscription.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,8 @@ class RemoteUnlockingLogic extends BaseGetXController {
|
|||||||
RemoteUnlockingState state = RemoteUnlockingState();
|
RemoteUnlockingState state = RemoteUnlockingState();
|
||||||
|
|
||||||
void remoteUnlockingOpenOrClose() async {
|
void remoteUnlockingOpenOrClose() async {
|
||||||
final LoginEntity entity = await ApiRepository.to.remoteUnlockingOpenOrClose(
|
final LoginEntity entity = await ApiRepository.to
|
||||||
|
.remoteUnlockingOpenOrClose(
|
||||||
lockId: state.lockSetInfoData.value.lockId!,
|
lockId: state.lockSetInfoData.value.lockId!,
|
||||||
remoteUnlock: state.remoteEnable.value == 1 ? 0 : 1);
|
remoteUnlock: state.remoteEnable.value == 1 ? 0 : 1);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
@ -32,7 +33,6 @@ class RemoteUnlockingLogic extends BaseGetXController {
|
|||||||
state.remoteEnable.value;
|
state.remoteEnable.value;
|
||||||
eventBus
|
eventBus
|
||||||
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
|
||||||
eventBus.fire(LockSetChangeSetRefreshLockDetailWithType(
|
eventBus.fire(LockSetChangeSetRefreshLockDetailWithType(
|
||||||
5,
|
5,
|
||||||
state.lockSetInfoData.value.lockSettingInfo!.remoteUnlock!
|
state.lockSetInfoData.value.lockSettingInfo!.remoteUnlock!
|
||||||
@ -44,6 +44,7 @@ class RemoteUnlockingLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 获取解析后的数据
|
// 获取解析后的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription =
|
_replySubscription =
|
||||||
EventBusManager().eventBus!.on<Reply>().listen((reply) {
|
EventBusManager().eventBus!.on<Reply>().listen((reply) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user