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的更多相关文章

  1. TextField widgets require a Material widget ancestor

    TextField widget需要被包裹在Scaffold widget中,否则会报错

  2. Flutter 即学即用系列博客——06 超实用 Widget 集锦

    本篇文章我们来讲讲一些比较常用的 Widget. 大家验证的时候使用下面的代码替换 main.dart 代码,然后在 //TODO 语句返回下面常用 Widget 示例的代码. import 'pac ...

  3. 【译】flutter中如何较好地实现隐藏和显示widget

    通常情况下,显示有四种情况: 1.(visible)显示 2.(invisible)隐藏: 这种隐藏是指在屏幕中占据空间,只是没有显示.这种情况出现场景如:用带有背景色的Container Widge ...

  4. Widget only supports Widgets as children

    Widget only supports Widgets as children https://www.baidu.com/s?wd=Widget%20only%20supports%20Widge ...

  5. java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView

    最近在学习drawerLayout时,遇到这个bug.如下示: java.lang.ClassCastException: android.widget.RelativeLayout cannot b ...

  6. 加载程序到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 ...

  7. 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 ...

  8. 安卓出现错误: 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 ...

  9. java.lang.ClassCastException:android.widget.Button cannot be cast to android.widget.ImageView

    今天遇到一个错误也不知道怎么回事,上网搜了一下: 出现的问题是:java.lang.ClassCastException:android.widget.Button cannot be cast to ...

随机推荐

  1. ansible学习笔记二

    Ad-Hoc命令: 所谓Ad-Hoc,简而言之是"临时命令",英文中作为形容词有"特别的,临时"的含义.Ad-Hoc只是官方对Ansible命令的一种称谓. 从 ...

  2. 查看linux服务器CPU相关

    查看linux服务器CPU相关: 1.查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l 2.查看 ...

  3. 谈谈jQuery中的数据类型检测

    这次是分享jQuery代码中的一些简写技巧,分析jQuery是如何优化代码的,如何用最少的代码来实现jQuery. 在我们工作中也常常会遇到一些数据类型检测,一些方法调用的形式 1 var arr = ...

  4. Rem自适应js---flexible.min.js

    网上看到很多移动端适配的各种方法,由于原来工作中对rem的疏忽,所以决定重新学习rem~ 由于移动端特殊性,本文讲的是如何使用rem实现自适应,或叫rem响应式布局,通过使用一个脚本就可以rem自适应 ...

  5. tarjan算法(求强连通子块,缩点)

    tarjan算法求图中的强连通子图的个数. #include<iostream> #include<stack> #include<queue> #include& ...

  6. logistic回归为什么要使用sigmoid函数

    https://www.baidu.com/link?url=LnDjrhLG7Fx6YVgR9WljUILkPZrIzOR402wr2goIS-ARtDv9TwZ2VYVbY74fyVpQlE22n ...

  7. Javascript - ExtJs - TabPanel组件

    示例 Ext.create('Ext.tab.Panel', {     width: "100%",     renderTo: "tabBox",      ...

  8. FLASK-----基本知识(一)

    中文文档(http://docs.jinkan.org/docs/flask/) 英文文档(http://flask.pocoo.org/docs/0.11/) FLASK介绍 Flask是一个基于P ...

  9. ZKClient操作zookeeper

    前面简单研究了curator的使用,下面简单研究zkclient的使用. 1.创建连接 private static final String CONNECT_ADDR = "127.0.0 ...

  10. CF1096D Easy Problem

    题目地址:CF1096D Easy Problem 比赛时高二dalaoLRZ提醒我是状压,然而,我还是没AC (汗 其实是一道很基础的线性dp \(f_{i,j}\) 表示序列第 \(i\) 个字符 ...