본문으로 바로가기

Row 와 Column은 주축, 부축을 기준으로 정렬할 수 있다.

주축을 main axis, 부축을 cross axis 라고 합니다. 

 

내부 요소들의 정렬은 MainAxisAlignment.center 와 같은 식으로 설정해준다.

Alignment 방법들을 시각화하면 아래와 같다.

출처: https://morioh.com/p/9c7541691c2c
출처: https://morioh.com/p/9c7541691c2c

 

 

위와 같이 배치되어 있는 요소들을 같은 선상에 맞추려면, Row 의 CrossAxisAlignment 를 설정해주면 된다.