[Flutter] MainAxisAlignment (Row, Column)

2024. 1. 16. 13:48dev/flutter

728x90
반응형

I always confused parameters spaceAround and spaceEvenly.

so I arrange this post.

 

ready to three container widget boxs.

Row(
  mainAxisAlignment: MainAxisAlignment.center,
  children: [
    Column(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: [
        Container(
          width: length,
          height: length,
          color: Colors.red,
        ),

        Container(
          width: length,
          height: length,
          color: Colors.yellow,
        ),

        Container(
          width: length,
          height: length,
          color: Colors.green,
        )
      ],
    ),
  ],
),

 

Row

spaceBetween spaceAround spaceEvenly

 

 

Column

spaceBetween spaceAround spaceEvenly

 

728x90
반응형

'dev > flutter' 카테고리의 다른 글

[Flutter] Splash  (0) 2024.01.17
[Flutter] sqflite SQLite Database #DB  (0) 2024.01.16
[Flutter] PIP, Picture in Picture Mode  (0) 2024.01.15
[Flutter] Timer, custom delay point  (0) 2024.01.15
[Flutter] Video Player  (0) 2024.01.15