Shirsh Shukla
Shirsh Shukla

Reputation: 5993

why crossAxisAlignment and mainAxisAlignment is different in row and column

As we all know,

For Row:

mainAxisAlignment = Horizontal Axis crossAxisAlignment = Vertical Axis

For Column:

mainAxisAlignment = Vertical Axis crossAxisAlignment = Horizontal Axis

But my question is why this two property perform differently in this two widget, For row and column.

Upvotes: 1

Views: 771

Answers (2)

Anil Thapa
Anil Thapa

Reputation: 11

As Per my Understanding Row Widget Always Grow Horizontally And Columns Grows Vertically ,SO it clears That MainaxisAlignment is Horizontal in Case Of Rows And Whereas For Colums MainaxisAlignMent is Vertical

Upvotes: 1

Jagadish
Jagadish

Reputation: 1186

Thats really simple..main axis is always in the direction acoording to column or row and Cross axis is always in the opposite direction of column and row. So for column and row It is different. Fr column main axis is vertical and cross axis is horizontal and vice versa for row. Hope you understand!

Upvotes: 1

Related Questions