fix:调整获取配网信息使用事件通知

This commit is contained in:
liyi 2025-04-10 11:05:09 +08:00
parent 80787fd0ea
commit 49ed169506
4 changed files with 15 additions and 3 deletions

View File

@ -285,7 +285,7 @@ class LockDetailLogic extends BaseGetXController {
final List<int> publicKeyData =
state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
final List<String> saveStrList = changeIntListToStringList(publicKeyData);
await Storage.setStringList(saveBluePublicKey, saveStrList);
await Storage.setStringList(saveBluePublicKey, saveStrList);
//
final List<int> privateKeyData =
@ -298,7 +298,7 @@ class LockDetailLogic extends BaseGetXController {
final List<int> signKeyData =
state.keyInfos.value.bluetooth!.signKey!.cast<int>();
final List<String> saveSignKeyList = changeIntListToStringList(signKeyData);
await Storage.setStringList(saveBlueSignKey, saveSignKeyList);
await Storage.setStringList(saveBlueSignKey, saveSignKeyList);
final bool ifHaveKey = await Storage.ifHaveKey(saveBlueToken);
if (!ifHaveKey) {
@ -838,5 +838,12 @@ class LockDetailLogic extends BaseGetXController {
state.keyInfos.refresh();
}
});
eventBus
.on<SuccessfulDistributionNetwork>()
.listen((SuccessfulDistributionNetwork event) {
//
requestDeviceNetworkInfo();
});
}
}

View File

@ -89,7 +89,6 @@ class _LockDetailPageState extends State<LockDetailPage>
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
state.isOpenLockNeedOnline.refresh();
logic.requestDeviceNetworkInfo();
}
StreamSubscription? _lockRefreshLockDetailInfoDataEvent;

View File

@ -484,6 +484,8 @@ class ConfiguringWifiLogic extends BaseGetXController {
dismissEasyLoading();
eventBus
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
eventBus
.fire(SuccessfulDistributionNetwork());
if (state.loadingTimer != null) {
state.loadingTimer!.cancel();
state.loadingTimer = null;

View File

@ -200,3 +200,7 @@ class AgreePrivacyAgreement {
AgreePrivacyAgreement();
}
///
class SuccessfulDistributionNetwork {
SuccessfulDistributionNetwork();
}