I need something that can align my widgets left, center, and right in a single row widget.
Now I have already used mainAxisAlignment:MainAxisAlignment.spaceBetween,
for my row widget. But here when I have some large content for my left widget then the spaceBetween
can align my center widget on bit right side, which ruins my app design.
Is there any option to use Align
widget for multiple widget in Row?
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15.0),
height: 27.0,
child: Container(
child: Center(
child: Text(
'TestDataTest',
),
),
),
),
Container(
height: 27.0,
child: Container(
child: Center(
child: Text(
'Test',
),
),
),
),
Container(
margin: EdgeInsets.only(right: 15.0),
height: 27.0,
child: Container(
child: Padding(
child: Center(
child: Text(
'T',
),
),
),
),
),
],
);
Here the image will describe the issue in brief. The above row is with the mentioned code and the next row is as expected output. Is there any solution that can align the widgets properly left, center, and right despite their content?