flutter No material widget found textfield widgets require a material widget ancestor
Error states that TextField widgets require a Material widget ancestor. Simply wrapping your whole loginWidget into Scaffold will solve the problem.
Widget LoginPage() {
return new Scaffold(body: *your whole code*)
}
flutter No material widget found textfield widgets require a material widget ancestor的更多相关文章
- TextField widgets require a Material widget ancestor
TextField widget需要被包裹在Scaffold widget中,否则会报错
- Flutter 即学即用系列博客——06 超实用 Widget 集锦
本篇文章我们来讲讲一些比较常用的 Widget. 大家验证的时候使用下面的代码替换 main.dart 代码,然后在 //TODO 语句返回下面常用 Widget 示例的代码. import 'pac ...
- 【译】flutter中如何较好地实现隐藏和显示widget
通常情况下,显示有四种情况: 1.(visible)显示 2.(invisible)隐藏: 这种隐藏是指在屏幕中占据空间,只是没有显示.这种情况出现场景如:用带有背景色的Container Widge ...
- Widget only supports Widgets as children
Widget only supports Widgets as children https://www.baidu.com/s?wd=Widget%20only%20supports%20Widge ...
- java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView
最近在学习drawerLayout时,遇到这个bug.如下示: java.lang.ClassCastException: android.widget.RelativeLayout cannot b ...
- 加载程序到android虚拟机报错: android.widget.RelativeLayout cannot be cast to android.widget.Button
05-23 02:53:48.416: E/Trace(875): error opening trace file: No such file or directory (2) 05-23 02:5 ...
- java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
Caused by: Java.lang.ClassCastException: Android.widget.TextView cannot be cast to android.widget.Ed ...
- 安卓出现错误: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
Caused by: Java.lang.ClassCastException: Android.widget.TextView cannot be cast to android.widget.Ed ...
- java.lang.ClassCastException:android.widget.Button cannot be cast to android.widget.ImageView
今天遇到一个错误也不知道怎么回事,上网搜了一下: 出现的问题是:java.lang.ClassCastException:android.widget.Button cannot be cast to ...
随机推荐
- JavaScript面试技巧(三):开发环境、运行环境
一.开发环境 1 介绍 2.IDE 3 .git - 4.模块化 - AMD CommonJS 5.构建工具 安装nodejs 安装webpack 配置webpack 使用jquery 压缩JS 6. ...
- Innobackupex(xtrabackup)物理备份
1. Percona XtraBackup介绍 Percona XtraBackup(简称PXB)是 Percona 公司开发的一个完全开源的用于 MySQL 数据库物理热备的备份工具,在备份过程中不 ...
- ASP.NET MVC中注册Global.asax的Application_Error事件处理全局异常
在ASP.NET MVC中,通过应用程序生命周期中的Application_Error事件可以捕获到网站引发的所有未处理异常.本文作为学习笔记,记录了使用Global.asax文件的Applicati ...
- IE9浏览器打开开发者工具代码正常执行,反之报错
1.can i use console IE9开发者工具打开时支持console对象,否则报错. 2.由于出现错误 80020101 而导致此项操作无法完成 测试代码 <!DOCTYPE ht ...
- link标签和css引入方式
link常见用途 <link> 标签最常见的用途是链接样式表,在 HTML 中,<link> 标签没有结束标签,此元素只能存在于 head 部分,不过它可出现任何次数. < ...
- 【Thymeleaf】Thymeleaf模板对没有结束符的HTML5标签解析出错的解决办法
解决方案 spring: thymeleaf: mode: LEGACYHTML5 <dependency> <groupId>net.sourceforge.nekohtml ...
- Shiro入门 - 通过自定义Realm连数数据库进行授权
shiro-realm.ini [main] #自定义Realm myRealm=test.shiro.MyRealm #将myRealm设置到securityManager,相当于Spring中的注 ...
- [转载]tensorflow中使用tf.ConfigProto()配置Session运行参数&&GPU设备指定
tf.ConfigProto()函数用在创建session的时候,用来对session进行参数配置: config = tf.ConfigProto(allow_soft_placement=True ...
- 【上载虚拟机】XX是一个Workstations 12.X虚拟机,不受XX支持。请选择其他主机或将虚拟机的硬件版本更改为以下选项之一。
背景 由于搭建集群时,要使用Ubuntu系统,还有一点就是咱们使用的Ubuntu系统是定制的,但是它是一个虚拟机,需要通过VMware Workstations这款软件,把咱们定制好的Ubuntu系统 ...
- Python3 GIL(Global Interpreter Lock)与多线程
GIL(Global Interpreter Lock)与多线程 GIL介绍 GIL与Lock GIL与多线程 多线程性能测试 在Cpython解释器中,同一个进程下开启的多线程,同一时刻只能有一个线 ...