Flutter Navigator
2019-08-13 本文已影响0人
FlatMap2021
报错日志:Navigator operation requested with a context that does not include a Navigator
错误原因:context不能为用户构建widget最根部的context,
解决方案:参考图片,参考demo把代码抽出放在新建的homePage里,这样context 获取的就不是Mydemo里的

修改:

报错日志:Navigator operation requested with a context that does not include a Navigator
错误原因:context不能为用户构建widget最根部的context,
解决方案:参考图片,参考demo把代码抽出放在新建的homePage里,这样context 获取的就不是Mydemo里的
修改: