I have a Column
widget with two TextField
widgets as children and I want to have some space between both of them.
I already tried mainAxi
There are many answers here but I will put here the most important one which everyone should use.
1. Column
Column(
children: [
Text('Widget A'), //Can be any widget
SizedBox(height: 20,), //height is space betweeen your top and bottom widget
Text('Widget B'), //Can be any widget
],
),
2. Wrap
Wrap(
direction: Axis.vertical, // We have to declare Axis.vertical, otherwise by default widget are drawn in horizontal order
spacing: 20, // Add spacing one time which is same for all other widgets in the children list
children: [
Text('Widget A'), // Can be any widget
Text('Widget B'), // Can be any widget
]
)