Step 1 / 4
Two axes
A Row lays children out horizontally (its main axis), a Column vertically. mainAxisAlignment distributes space along that axis. crossAxisAlignment aligns children across it.
Arrange widgets along an axis, share space with Expanded, and avoid the yellow-and-black overflow stripes.
1Row(2 mainAxisAlignment: MainAxisAlignment.spaceBetween,3 crossAxisAlignment: CrossAxisAlignment.center,4 spacing: 12,5 children: [6 const Icon(Icons.person),7 Expanded(8 child: Text(user.name, overflow: TextOverflow.ellipsis),9 ),10 TextButton(onPressed: follow, child: const Text('Follow')),11 ],12)
Row(mainAxisAlignment: .start, crossAxisAlignment: .center)A Row lays children out horizontally (its main axis), a Column vertically. mainAxisAlignment distributes space along that axis. crossAxisAlignment aligns children across it.