fix:调整获取配网信息使用事件通知
This commit is contained in:
parent
80787fd0ea
commit
49ed169506
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +89,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
||||
state.isOpenLockNeedOnline.refresh();
|
||||
|
||||
logic.requestDeviceNetworkInfo();
|
||||
}
|
||||
|
||||
StreamSubscription? _lockRefreshLockDetailInfoDataEvent;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -200,3 +200,7 @@ class AgreePrivacyAgreement {
|
||||
AgreePrivacyAgreement();
|
||||
}
|
||||
|
||||
/// 配网成功
|
||||
class SuccessfulDistributionNetwork {
|
||||
SuccessfulDistributionNetwork();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user