Flutter : RenderBox was not laid out: RenderRepaintBoundary#58c65 relayoutBoundary=up1 NEEDS-PAINT
I was facing a similar issue
Found out that the Spacer() widget was creating the UI render issue
This is not a solution to this question, but it might help someone
Thank you!
You can use ListView
instead of SingleChildScrollView
so no need for the column at first of the code.
@overrideWidget build(BuildContext context) {return Scaffold( body: SafeArea( child: ListView( shrinkWrap: true, children: <Widget>[ Form(...), ], ),), );
I don't understand why you use stack .Without stack it works fine.
@override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: SingleChildScrollView( child:Column( children: <Widget>[ Form( key: _formKey, child: new Theme( data: ThemeData( accentColor: Colors.purple, primaryColor: Colors.blue, inputDecorationTheme: new InputDecorationTheme( labelStyle: new TextStyle( color: Colors.lightBlue, fontSize: 20.0, ))), child: Padding( padding: const EdgeInsets.all(20.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text( "Register", style: TextStyle( fontSize: 30.0, fontWeight: FontWeight.bold), ), Container( margin: const EdgeInsets.only(top: 20.0), child: Text( "Full Name", style: TextStyle( fontSize: 20.0, ), ), ), TextFormField( style: TextStyle(color: Colors.grey), decoration: new InputDecoration( labelStyle: TextStyle( color: Colors.grey, ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.blue), ), border: UnderlineInputBorder()), keyboardType: TextInputType.emailAddress, ), Container( margin: const EdgeInsets.only(top: 20.0), child: Text( "Address", style: TextStyle( fontSize: 20.0, ), ), ), TextFormField( style: TextStyle(color: Colors.grey), decoration: new InputDecoration( labelStyle: TextStyle( color: Colors.grey, ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.blue), ), border: UnderlineInputBorder()), keyboardType: TextInputType.emailAddress, ), Container( margin: const EdgeInsets.only(top: 20.0), child: Text( "Phone Number", style: TextStyle( fontSize: 20.0, ), ), ), TextFormField( style: TextStyle(color: Colors.grey), decoration: new InputDecoration( labelStyle: TextStyle( color: Colors.grey, ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.blue), ), border: UnderlineInputBorder()), keyboardType: TextInputType.emailAddress, ), Container( margin: const EdgeInsets.only(top: 20.0), child: Text( "Company Name", style: TextStyle( fontSize: 20.0, ), ), ), TextFormField( style: TextStyle(color: Colors.grey), decoration: new InputDecoration( labelStyle: TextStyle( color: Colors.grey, ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.blue), ), border: UnderlineInputBorder()), keyboardType: TextInputType.emailAddress, ), Container( margin: const EdgeInsets.only(top: 20.0), child: Text( "Email Address", style: TextStyle( fontSize: 20.0, ), ), ), TextFormField( style: TextStyle(color: Colors.grey), decoration: new InputDecoration( labelStyle: TextStyle( color: Colors.grey, ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.blue), ), border: UnderlineInputBorder()), keyboardType: TextInputType.emailAddress, ), Container( margin: const EdgeInsets.only(top: 20.0), child: Text( "Password", style: TextStyle( fontSize: 20.0, ), ), ), TextFormField( style: TextStyle(color: Colors.grey), decoration: new InputDecoration( labelStyle: TextStyle( color: Colors.grey, ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.blue), ), border: UnderlineInputBorder()), keyboardType: TextInputType.emailAddress, ), Align( alignment: Alignment.center, child: Container( margin: const EdgeInsets.only(top: 40.0), child: new MaterialButton( textColor: Colors.white, minWidth: 250.0, padding: const EdgeInsets.all(15.0), color: Colors.blue[400], child: new Text( "Register", style: TextStyle( color: Colors.white,// fontWeight: FontWeight.bold, fontSize: 20.0), ), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(50.0)), onPressed: () { if (_formKey.currentState .validate()) {} }, splashColor: Colors.redAccent[100], ), ), ) ], ), )), ) ], ) , ), ) ); }