dev/flutter

[Flutter] MainAxisAlignment (Row, Column)

donguran 2024. 1. 16. 13:48
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
반응형