fix/startup-white-screen
main
BackgroundWidget 定义了静态 BackgroundWidget.spec 并对外暴露, 但组件内部从未 addListener 订阅它。设置页通过 Provider 更新壁纸后, spec 的值确实变了,组件却收不到通知,既不重建也不重新加载, 界面一直停在旧图上。
BackgroundWidget 位于 MaterialApp.builder 内,路由跳转不会触发其 重建,因此必须依赖监听而非重建来响应变更。
补充 initState 中 addListener、dispose 中 removeListener。
BackgroundWidget 定义了静态 BackgroundWidget.spec 并对外暴露, 但组件内部从未 addListener 订阅它。设置页通过 Provider 更新壁纸后, spec 的值确实变了,组件却收不到通知,既不重建也不重新加载, 界面一直停在旧图上。 BackgroundWidget 位于 MaterialApp.builder 内,路由跳转不会触发其 重建,因此必须依赖监听而非重建来响应变更。 补充 initState 中 addListener、dispose 中 removeListener。
No dependencies set.
The note is not visible to the blocked user.
BackgroundWidget 定义了静态 BackgroundWidget.spec 并对外暴露,
但组件内部从未 addListener 订阅它。设置页通过 Provider 更新壁纸后,
spec 的值确实变了,组件却收不到通知,既不重建也不重新加载,
界面一直停在旧图上。
BackgroundWidget 位于 MaterialApp.builder 内,路由跳转不会触发其
重建,因此必须依赖监听而非重建来响应变更。
补充 initState 中 addListener、dispose 中 removeListener。
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.