從今開始連載了,先來介紹下經常使用的不經常使用的widgets,從最簡單的column開始。bash
默認值:MainAxisAlignment.start:ide
默認值:CrossAxisAlignment.center,默認是水平居中佈局
默認值:是空的字體
默認值:沒有,但在row的佈局上是左到右的,請看Row的章節spa
new Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
verticalDirection: VerticalDirection.down,
// textDirection:,
textBaseline: TextBaseline.alphabetic,
children: <Widget>[
Container(
color: Colors.red,
height: 30,
width: 30,
),
Container(
color: Colors.blue,
height: 30,
width: 30,
),
Container(
color: Colors.yellow,
height: 30,
width: 30,
),
],
),
),
複製代碼
默認值:VerticalDirection.down 也就是從上到下的佈局code