Flutter Navigator operation requested with a context that does not include a Navigat
如下直接在 MaterialApp 中使用 Navigator 是会报 Navigator operation requested with a context that does not include a Navigat. ...
修改为如下所示,将要使用路由的部分嵌套一层即可正常使用。
总结:要使用 路由(Navigator),根控件不能直接是 MaterialApp.
解决方法:将 MaterialApp 内容再使用 StatelessWeight 或 StatefulWeight 包裹一层。
Flutter Navigator operation requested with a context that does not include a Navigat的更多相关文章
- flutter dialog异常Another exception was thrown: Navigator operation requested with a context that does not include a Navigator
我在使用flutter里的对话框控件的时候遇到了一个奇怪的错误 Another exception was thrown: Navigator operation requested with a c ...
- flutter: Another exception was thrown: Navigator operation requested with a context that does not include a Navigator.
import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends State ...
- System.TimeoutException: The operation requested on PersistentChannel timed out
这个异常是在使用EasyNetQ时,遇到的问题,找了两个小时. 详细错误 Error:System.TimeoutException: The operation requested on Persi ...
- ABP .Net Core 调用异步方法抛异常A second operation started on this context before a previous asynchronous operation completed
1. 问题描述 最近使用ABP .Net Core框架做一个微信开发,同时采用了一个微信开发框架集成到ABP,在微信用户关注的推送事件里调用了一个async 方法,由于没有返回值,也没做任何处理,本 ...
- Flutter Navigator&Router(导航与路由)
参考地址:https://www.jianshu.com/p/b9d6ec92926f 在我们Flutter中,页面之间的跳转与数据传递使用的是Navigator.push和Navigator.pop ...
- Flutter Navigator 跳转
1,routes 静注册,使用 跳转 Navigator.pushNamed(context, "/main"); 2,静态跳转及销毁当前页面使用 Navigator.pushNa ...
- flutter Failed to setup Skia Gr context导致白屏
添加 --enable-software-rendering参数运行 G:\soft\flutter\project\hello_world> flutter run --enable-soft ...
- Entity Framework Core: A second operation started on this context before a previous operation completed
我这边报错是因为函数声明的是async void 而实现中有多个task任务,导致的线程不安全
- 【Flutter学习】一些重要的概念之of(context)方法
在flutter中我们经常会使用到这样的代码 //打开一个新的页面 Navigator.of(context).push //打开Scaffold的Drawer Scaffold.of(context ...
随机推荐
- 一文读懂HDMI和VGA接口针脚定义
一文读懂HDMI和VGA接口针脚定义 摘自:http://www.elecfans.com/yuanqijian/jiekou/20180423666604.html HDMI概述 HDMI是高清 ...
- mongodb密码忘了怎么办
自己电脑上mongodb好长时间没上了,密码竟然给忘了,悲剧啊! 修改auth为false,然后重新启动mongodb 这时候可以不用登陆直接进入 db.changeUserPassword('use ...
- Redis安装及HA(High Availability)配置(转)
出处:http://www.cnblogs.com/morvenhuang/p/4184262.html Redis是一种内存数据库,以KEY-VALUE(即键值对)的形式存储数据.这篇文章主要介绍的 ...
- oracle11g客户端配置及使用(Instant Client)
http://www.oracle.com/technetwork/topics/winx64soft-089540.html http://www.cnblogs.com/ychellboy/a ...
- zuluCryt cli howto
1.解锁卷的命令. zuluCrypt-cli -o -d /dev/sdc1 -m blabla -e ro -f /home/keyFile zuluCrypt-cli -o -d /dev/sd ...
- unity小记
1.window下的Occlusion Culling是实现遮挡剔除效果,即不再摄像机里出现的物体使其不被渲染. 这样做要使物体为静态的,而且效果在设计时只在Occlusion面板下有效 2.wind ...
- ARIA(Accessible Rich Internet Application)
ARIA 为Web app提供满足用户不同需求的解决方案.建设起用户和软件之间的桥梁. 新的HTML5标准中增加 aria-* 的标签属性,全称Accessible Rich Internet App ...
- eclipse可以调试但是无法打开网页,提示一直在加载
工作过程中遇到了eclipse调试可以正常执行,也没有报错,但是通过浏览器打开网页就是打不开,还提示一直加载.这个问题找了很多网页和搜索引擎,大多数的方法就是重新配置elipse里的tomcat的we ...
- ifstat命令行统计网络流量
下载 ifstat , http://gael.roualland.free.fr/ifstat/ifstat-1.1.tar.gz tar xzvf ifstat-1.1.tar.gz ...
- oracle通过job执行procedure
1. 先创建一个FUNCTION CREATE OR REPLACE FUNCTION GET_TIMEOUT_PROGRAM(i_customerNo IN TK_CUST_PROG_D.CUSTO ...