fix(client): 自动连接回调 NoSuchMethod(valueOrNull on dynamic)— 真正根因

日志显示每次节点加载,_maybeAutoConnect 回调抛 NoSuchMethodError:AsyncData 没有 valueOrNull
(在判 autoConnect 之前就崩)→ 自动连接从未生效。根因:sub 声明成裸 ProviderSubscription
(=<dynamic>),逼 listenManual 推断成 dynamic,next 变 dynamic;valueOrNull 是扩展 getter,
dynamic 上不解析 → 运行期 NoSuchMethod。修:sub 标全泛型 ProviderSubscription<AsyncValue<List<Node>>>。
(1.0.18 的竞态修复是误判,真凶是这个崩溃。)诊断日志暂留,确认后清。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-29 18:46:57 +08:00
parent f734126eb6
commit 7fdadace4e
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
; 前置: 先在 client/ 跑 `flutter build windows`(Release),产物在
; ..\..\build\windows\x64\runner\Release
#define MyAppName "穿山甲 Pangolin"
#define MyAppVersion "1.0.19"
#define MyAppVersion "1.0.20"
#define MyAppPublisher "Pangolin"
#define MyAppExeName "pangolin_vpn.exe"
#define BuildDir "..\..\build\windows\x64\runner\Release"