I have a row with effectively 2 children. The first is a label, and the second some icons. I would like the first child to be aligned left and the second to be aligned right.
If I change the spaceEvenly, it bunches them up together – it is just the alignment I want to change.
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text("label here"),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.star, color: Colors.amber[500]),
Icon(Icons.star, color: Colors.amber[500]),
Icon(Icons.star, color: Colors.amber[500]),
Icon(Icons.star, color: Colors.amber[500]),
],
),
],
),
2
Answers
First of all i didn’t get the question correctly. If you have a sample design please add it. And as per the question, I think this code could help you.
Use can use
crossAxisAlignment
property ofRow
.Output: