どうも、ちょげ(@chogetarou)です。
Container自体の位置を下に寄せる方法を紹介します。
方法

Container自体の位置を下に寄せるには、まず「Align」の「child」に「Container」を指定します。
そして、Alignの引数「alignment」に「Alignment.bottomCenter」を指定します。
Align(
alignment: Alignment.bottomCenter,
child: Container(),
),
以下は、使用例です。
@override
Widget build(BuildContext context) {
return Scaffold(
body: Align(
alignment: Alignment.bottomCenter,
child: Container(
width: 200,
height: 200,
color: Colors.blue,
),
),
);
}

コメント