I want to add Text and image together on home.
However, the error continues to occur. What’s wrong with my code?
3
you are using wrong widget, replace your body with this:
body: Column( children: [ const Text('닮은 꼴 찾기'), Image.asset('assets/images/face_home_img_1.png'), ], ), floatingActionButton: ...
container doesn’t have children property. If you want to show multi widget under each other you need to use Column
container
Column
Your code is entirely messed up. use the column up down the widgets and use Row for side by side the two widget
column
Row
Column( children: [ const Text('닮은 꼴 찾기 '), Image.asset('assets/images/face_home_img_1.png'), ], )
Your code structure is very wrong even though you can’t have the flow like container->child->children you should not do it like this
child
children
The better way to optimize it is container->child->Column and Column will have children and then your code goes like this
Column( children: [ const Text('닮은 꼴 찾기'), Image.asset('assets/images/face_home_img_1.png'), ], ),
Click here to cancel reply.
3
Answers
you are using wrong widget, replace your body with this:
container
doesn’t have children property. If you want to show multi widget under each other you need to useColumn
Your code is entirely messed up. use the
column
up down the widgets and useRow
for side by side the two widgetYour code structure is very wrong even though you can’t have the flow like
container
->child
->children
you should not do it like thisThe better way to optimize it is
container
->child
->Column
and Column will have children and then your code goes like this