Organizing Your Flutter UI with Rows and Columns
To lay out multiple widgets vertically or horizontally, we can use the Column and Row widgets respectively. Both widgets take a children property, which is a list of widgets to display.
Here's an example of laying out three widgets horizontally using the Row widget
Row:
Row(
children: [
Image.asset(Images.logoBird, width: 300, height: 200,),
Image.asset(Images.logoBird, width: 300, height: 200,),
Image.asset(Images.logoBird, width: 300, height: 200,),
],
);
Column:
Here's an example of laying out three widgets vertically using the Column widget:
Column(
children: [
Image.asset(Images.logoBird, width: 300, height: 200,),
Image.asset(Images.logoBird, width: 300, height: 200,),
Image.asset(Images.logoBird, width: 300, height: 200,),
],
);
Comments
Post a Comment