Navigator operation requested with a context that does not include a Navigator. The context used to
Posted 安果移不动
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Navigator operation requested with a context that does not include a Navigator. The context used to相关的知识,希望对你有一定的参考价值。
原因是因为runApp直接嵌套的 StatefulWidget
并且StatefulWidget 中有路由跳转。。。
修改方式
runApp 打开StatelessWidget
StatelessWidget 中再 嵌套 StatefulWidget 组件
以上是关于Navigator operation requested with a context that does not include a Navigator. The context used to的主要内容,如果未能解决你的问题,请参考以下文章