title: No Material Widget found textfield widgets require a material widget ancestor(Flutter)
body: <p>Hi I am trying to build a login screen in flutter but I am getting below error when opening it.</p>
  <p>No material widget found textfield widgets require a material widget ancestor</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>class HomePage extends StatelessWidget {
    final TextEditingController emailController = TextEditingController();
    final TextEditingController passwordController = TextEditingController();
  
    @override
    Widget build(BuildContext context) {
      return MultiProvider(
        providers: [
          Provider&lt;AuthenticationService&gt;(
            create: (_) =&gt; AuthenticationService(FirebaseAuth.instance),
          ),
          StreamProvider(
            create: (context) =&gt;
            context.read&lt;AuthenticationService&gt;().authStateChanges,
          ),
        ],
        child:MaterialApp(
          home: SingleChildScrollView(
              child: Container(
                child: Column(
                  children: &lt;Widget&gt;[
                    Container(
                      height: 400,
                      decoration: BoxDecoration(
                          image: DecorationImage(
                              image: AssetImage('assets/images/loginHeader.png'),
                              fit: BoxFit.fill)),
                      child: Stack(
                        children: &lt;Widget&gt;[],
                      ),
                    ),
                    Padding(
                      padding: EdgeInsets.all(30.0),
                      child: Column(
                        children: &lt;Widget&gt;[
                          FadeAnimation(
                              1.8,
                              Container(
                                padding: EdgeInsets.all(5),
                                decoration: BoxDecoration(
                                    color: Colors.white,
                                    borderRadius: BorderRadius.circular(10),
                                    boxShadow: [
                                      BoxShadow(
                                          color:
                                          Color.fromRGBO(143, 148, 251, .2),
                                          blurRadius: 20.0,
                                          offset: Offset(0, 10))
                                    ]),
                                child: Column(
                                  children: &lt;Widget&gt;[
                                    Container(
                                      padding: EdgeInsets.all(8.0),
                                      decoration: BoxDecoration(
                                          border: Border(
                                              bottom: BorderSide(
                                                  color: Colors.grey[100]))),
                                      child: TextField(
                                        controller: emailController,
                                        decoration: InputDecoration(
                                            border: InputBorder.none,
                                            hintText: "Email or Phone number",
                                            hintStyle: TextStyle(
                                                color: Colors.grey[400])),
                                      ),
                                    ),
                                    Container(
                                      padding: EdgeInsets.all(8.0),
                                      child: TextField(
                                        controller: passwordController,
                                        obscureText: true,
                                        decoration: InputDecoration(
                                            border: InputBorder.none,
                                            hintText: "Password",
                                            hintStyle: TextStyle(
                                                color: Colors.grey[400])),
                                      ),
                                    )
                                  ],
                                ),
                              )),
                          SizedBox(
                            height: 30,
                          ),
                          RaisedButton(
                            padding:
                            EdgeInsets.only(left: 100, right: 100, top: 20, bottom: 20),
                            shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(28.0),
                                side: BorderSide(color: Colors.red)),
                            onPressed: () {
                              gotoPatientList(BuildContext context) {
                                Navigator.push(
                                  context,
                                  MaterialPageRoute(builder: (context) =&gt;PatientList()),
                                );
                              }
                              context.read&lt;AuthenticationService&gt;().signIn(
                                email: emailController.text.trim(),
                                password: passwordController.text.trim(),
                              );
                              gotoPatientList(context);
                            },
                            color: Color.fromRGBO(214, 0, 27,1),
                            textColor: Colors.white,
                            child: Text("Login".toUpperCase(),
                                style: TextStyle(fontSize: 14)),
                          ),
                           Padding(padding:EdgeInsets.only(top: 15),
  
                    ),
                          ClipOval(
                            child: RaisedButton(
                              onPressed: () {
                                gotoForgotPassword(BuildContext context) {
                                  Navigator.push(
                                    context,
                                    MaterialPageRoute(builder: (context) =&gt;ForgotPassword()),
                                  );
                                }
                                gotoForgotPassword(context);
                              },
                              child: Text("Forgot Password"),
                              textColor: Colors.white,
                              color:Color.fromRGBO(214, 0, 27, 1),
                            ),
                          ),
                        ],
                      ),
                    )
                  ],
                ),
              ),
            ),
          ),
      );
    }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>In material design most widgets are conceptually printed on a sheet of material In flutter material library that material is represented by the Material widget that renders ink splashes</p>