Flutter align two items on extremes - one on the left and one on the right
Use a single Row
instead, with mainAxisAlignment: MainAxisAlignment.spaceBetween
.
new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
new Text("left"),
new Text("right")
]
);
Or you can use Expanded
new Row(
children: [
new Text("left"),
new Expanded(
child: settingsRow,
),
],
);
A simple solution would be to use Spacer()
between the two widgets
Row(
children: [
Text("left"),
Spacer(),
Text("right")
]
);