flutter_boost
flutter_boost copied to clipboard
add null check
对popUtil方法中最后的targetPage进行判空。
related issue: #2141 #2129
那我是不是可以理解为,如果使用 withContainer 模式,就必须带有 uniqueId,否则就会报错。这一点在文档和注释上似乎都没有体现出来,是否还需要更新一下相关的文档资料。
并不是,没有uniqueId也是会根据route name来查找需要的container和page。这个PR只是做保护,问题点还是使用时,为什么会出现targetPage找不到的情况,这个就需要知道是怎么用FlutterBoost的了,调用popUntil之前,路由堆栈里是什么样的。
@joechan-cq 感谢贡献代码!建议再在BoostNavigator的popUntil函数中对route和uniqueId增加assert断言判断,然后这个问题会更加完善的解决。
add assert for route and uniqueId in popUtil
LGTM