当 _hasMainFrameError=true 时,Visibility(visible:false) 将 WebView 替换为 SizedBox.shrink()(0×0),这是 Stack 唯一的非 positioned 子组件。 Scaffold.body 提供松约束(0→max),导致 Stack 尺寸为 0×0, Positioned.fill 的 ErrorOverlay 也变为 0×0,用户只能看到 Scaffold 的 深色背景而看不到错误页面的内容。 修复方式:用 SizedBox.expand() 包裹 Stack,强制紧约束使其始终填满屏幕。 附带变更: - 添加 _debugLog() 封装(kDebugMode 保护) - 在 7 个关键状态转换点添加调试日志 |
||
|---|---|---|
| .. | ||
| web_android_shell | ||
| web_shell_core | ||