名稱 | 功能 |
alignment
|
topCenter:頂部居中對齊
topLeft:頂部左對齊
topRight:頂部右對齊
center:水平垂直居中對齊
centerLeft:垂直居中水平居左對齊
centerRight:垂直居中水平居右對齊
bottomCenter 底部居中對齊
bottomLeft:底部居左對齊
bottomRight:底部居右對齊
|
decoration
|
decoration: BoxDecoration(
color: Colors.blue,
border: Border.all(
color: Colors.red,
width: 2.0,
),
borderRadius:
BorderRadius.all(
Radius.circular(8.0)
)
)
注意:150就是圓形。
|
margin
|
margin 屬性是表示 Container 與外部其他
組件的距離。
EdgeInsets.all(20.0),
|
padding
|
padding 就 是 Container 的 內 邊 距 , 指
Container 邊緣與 Child 之間的距離
padding: EdgeInsets.all(10.0)
|
transform
|
讓 Container 容易進行一些旋轉之類的
transform: Matrix4.rotationZ(0.2)
|
height
|
容器高度
|
width
|
容器寬度
|
child
|
容器子元素
|