Reputation: 2350
How is it possible to align all items to the bottom of a Row
in flutter? I have got one widget in the Row
which changes its height at runtime and due to that, all other widgets of the Row
automatically center themselves, too. My question is: how do you prevent these other widgets from moving and pin them to the bottom?
Upvotes: 0
Views: 303
Reputation: 11
Row(
crossAxisAlignment: CrossAxisAlignment.end,
)
I hope you succeeded
Upvotes: 1
Reputation: 4854
What you're looking for is CrossAxisAlignment
:
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Container(width: 100, height: 200, color: Colors.red),
Container(width: 100, height: 300, color: Colors.blue),
SizedBox(
width: 100,
height: 150,
child: FittedBox(
fit: BoxFit.contain,
child: const FlutterLogo(),
),
),
],
)
Upvotes: 1