Answers for "incorrect use of parentdatawidget when using expanded"

1

Incorrect use of ParentDataWidget

In this case just removing Expanded or wrapping it in a Column should fix the 
problem.

An Expanded widget must be a descendant of a Row, Column, or Flex

The fix for this above issue, is to move the expanded widget inside a flex 
widget. Example below.

Row(
    children: [
      Expanded(
        ... ... ..
        .... .. .. 
      ),
      ......
      ......
    ],
 ),
Posted by: Guest on April-18-2021
0

incorrect use of parentdatawidget when using expanded

Row(
    children: [
      Expanded(
        child: Column(
          children: [
            Container(
              padding: EdgeInsets.only(bottom: 8.0),
              child: Text(
                "Some Lage Somthing",
                style: TextStyle(fontWeight: FontWeight.bold),
              ),
            ),
            Text("Someplace, Country")
          ],
        ),
      ),
      Icon(Icons.star)
    ],
  ),
);
Posted by: Guest on April-19-2021

Code answers related to "incorrect use of parentdatawidget when using expanded"

Browse Popular Code Answers by Language