I think I am not seeing a simple solution to this, but I want to have purple icon and text at the same height as black icon, when I have purple divider in first example as first item

Here is how my code of this purple Column look like:
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 4,
width: size.width * 0.22,
color: Colors.deepPurple,
),
const Column(
children: [
Icon(
Icons.home,
color: Colors.deepPurple,
),
Text(
'Strona główna',
style: TextStyle(
color: Colors.deepPurple
),
)
],
),
],
),
I tried using Expanded or Spacer but it didnt work for me.
>Solution :
If this is the result you are looking for
You can use mainAxisAlignment: MainAxisAlignment.center for the outer Column widget, and put the inner Column inside Expanded and Padding.
This is the code:
Column(
mainAxisAlignment: MainAxisAlignment.center, // Changed this!
children: [
Container(
height: 4,
width: size.width * 0.22,
color: Colors.deepPurple,
),
const Expanded(
child: Padding(
padding: EdgeInsets.only(top: 13.0), // Change this if not in the middle
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.home,
color: Colors.deepPurple,
),
Text(
'Strona główna',
style: TextStyle(color: Colors.deepPurple),
)
],
),
),
),
],
),
