incorrect use of parentdatawidget when using expanded code example
Example 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(
... ... ..
.... .. ..
),
......
......
],
),
Example 2: 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)
],
),
);