Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Error : The _ScaffoldLayout custom multichild layout delegate forgot to lay out the following child

Tags:

flutter

dart

I'm having unknown exception thrown when I run the app on emulator :

The _ScaffoldLayout custom multichild layout delegate forgot to lay out the following child:

I'm using Flutter 1.0.0 and Dart 2.1.0

I tried to look up on google but couldn't find the solution.

Here is my code :

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Text Input Example"),
      ),
      body: Column(
        children: <Widget>[
          Align(
            alignment: Alignment.bottomCenter,
            child: Flexible(
              child: TextField(
                style: TextStyle(
                  color: Colors.black,
                  fontSize: 16.0
                ),
              ),
            ),
          )
        ],
      ),
    );
  }
like image 982
Detained Developer Avatar asked Jan 17 '19 18:01

Detained Developer


1 Answers

Got the same error while trying to hot-reload or hot-restart my app. Cold restarting it (stop then start again) fixed it.

like image 166
GilDev Avatar answered Oct 21 '22 16:10

GilDev