Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

RenderBox was not laid out: RenderRepaintBoundary#5291c relayoutBoundary=up1 NEEDS-PAINT

I have a form widget which holds the Column as its child. The reason of Column widget is to have username and password fields one after another-password field in new line. In addition, I need to have username and password logos next to the respective fields, so I decided to use Row widget which will hold the Icon and TextFormField. However, flutter provides me error. Can someone please help?

Row(
        children: [
          
      Padding(
        padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 30),
        child: TextFormField(
        
        enabled: formFieldEditable,
        validator: emptyNullValidatorForFormField,
        
        decoration: InputDecoration(
         focusedBorder: _inputFormFieldOutlineInputBorder(
          borderSideWidth: ProjectSpecifics.signinScreenInputBorderWidth,
          borderSideColor: ProjectSpecifics.signInPageInputBorder,
        ),
        
        enabledBorder:_inputFormFieldOutlineInputBorder(
          borderSideWidth: ProjectSpecifics.signinScreenInputBorderWidth,
          borderSideColor: ProjectSpecifics.signInPageInputBorder,
        ),
        
          
        /*icon: Container(
          decoration: BoxDecoration(
            border: Border.all(
              color: const Color(0xFF5663FE),
              width: 2,
            ),
        
            borderRadius: BorderRadius.circular(5),
          ),
          child: const Icon(
            Icons.email,
            color: ProjectSpecifics.signInPageInputBorder,
          ),
        ),*/
        
        labelText: "EMAIL"),
        
        
                onChanged: (val) {
        emailVariableReference = val;
                },
        ),
      ),],
      ),

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Wrap TextFormField with Flexible or Expanded widget.

Column(
  mainAxisAlignment: MainAxisAlignment.start,
  mainAxisSize: MainAxisSize.min,
  children: [
    Row(
      mainAxisSize: MainAxisSize.min,
      children: [
        Icon(Icons.radar),
        Expanded(child: TextFormField()),
      ],
    ),
    Row(
      mainAxisSize: MainAxisSize.min,
      children: [
        Icon(Icons.abc),
        Flexible(child: TextFormField()),
      ],
    ),
  ],
),
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading