There are many ways of doing it, I’m listing a few here:
-
Use
SizedBoxif you want to set some specific spaceRow( children: <Widget>[ Text("1"), SizedBox(width: 50), // give it width Text("2"), ], )
-
Use
Spacerif you want both to be as far apart as possible.Row( children: <Widget>[ Text("1"), Spacer(), // use Spacer Text("2"), ], )
-
Use
mainAxisAlignmentaccording to your needs:Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, // use whichever suits your need children: <Widget>[ Text("1"), Text("2"), ], )
-
Use
Wrapinstead ofRowand give somespacingWrap( spacing: 100, // set spacing here children: <Widget>[ Text("1"), Text("2"), ], )
-
Use
Wrapinstead ofRowand give it alignmentWrap( alignment: WrapAlignment.spaceAround, // set your alignment children: <Widget>[ Text("1"), Text("2"), ], )