0

Whenever I am writing Text(email.toString()), it gives the error of RenderFlex overflowed, please help me how to fix it. I am using SharedPreferences.

Before writing Text(email.toString()) - it works fine

When writing Text(email.toString() - it gives error of RenderFlex overflowed

2 Answers2

0

Add your Text widget inside Expanded or Flexible widget, try below code:

Row(
  children: [
    Text('Email'),
    SizedBox(
      width: 10,
    ),
    Expanded(
      child: Text(
          'putyouremailaddress@gmail.computyouremailaddress@gmail.com'),
    ),
  ],
),

    

Result: image

Ravindra S. Patil
  • 11,757
  • 3
  • 13
  • 40
0

replace your Row with this one...

Row(
  children: [
    const Text("Email"),
    Expanded(
      child: Text(email.toString()),
    ),
  ],
),