Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to use expanded but I am facing following error incorrect use of parent data widget. expanded widgets must be placed inside flex widgets in flutter. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How expanded widgets must be placed inside flex widgets Error Occurs ?
I am just trying to use expanded but I am facing following error.
incorrect use of parent data widget. expanded widgets must be placed inside flex widgets
How To Solve expanded widgets must be placed inside flex widgets Error ?
- How To Solve expanded widgets must be placed inside flex widgets Error ?
To Solve expanded widgets must be placed inside flex widgets Error You Just need to use
Expanded
only within acolumn
,row
orflex
. Or Just Wrap Expanded with Row And Also Just Wrap Expanded with Column Of Flex will solve your error. - expanded widgets must be placed inside flex widgets
To Solve expanded widgets must be placed inside flex widgets Error You Just need to use
Expanded
only within acolumn
,row
orflex
. Or Just Wrap Expanded with Row And Also Just Wrap Expanded with Column Of Flex will solve your error.
Solution 1: Use expanded with this widget
You Just need to use Expanded
only within a column
, row
or flex
.
Solution 2: Wrap Expanded with Row
Just Wrap Expanded with Row
Row(
children: [
Expanded(
child: MyWidget(),
),
],
)
Solution 3: Wrap Expanded with Column
Just Wrap Expanded with Column
Column(
children: [
Expanded(
child: MyWidget(),
),
],
)
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- java.lang.IllegalArgumentException: Component class com.google.android.gms.wallet.ocr.CardRecognitionShimProxyActivity
- xcodebuild: WARNING: Using the first of multiple matching destinations
- Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema in flutter
- cmdline-tools component is missing Error in Flutter
- The argument type ‘PointerEvent’ can’t be assigned to the parameter type ‘PointerDownEvent’
Leave a Reply