Flutter Container内の位置を下寄せにするサンプル

環境
Windows11 pro 64bit
Flutter 3.3.7

構文
Container(
alignment: Alignment.bottomCenter,
),
Containerを下寄せにするには、引数「alignment」に「Alignment.bottomCenter」を指定します。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Container(
alignment: Alignment.bottomCenter,
height: 200,
width: 200,
color: Colors.red,
child: Text('test'),
),
Container( alignment: Alignment.bottomCenter, height: 200, width: 200, color: Colors.red, child: Text('test'), ),
Container(
  alignment: Alignment.bottomCenter,
  height: 200,
  width: 200,
  color: Colors.red,
  child: Text('test'),
),

 

Flutter

Posted by arkgame