名称 | 功能 |
alignment
|
topCenter:顶部居中对齐
topLeft:顶部左对齐
topRight:顶部右对齐
center:水平垂直居中对齐
centerLeft:垂直居中水平居左对齐
centerRight:垂直居中水平居右对齐
bottomCenter 底部居中对齐
bottomLeft:底部居左对齐
bottomRight:底部居右对齐
|
decoration
|
decoration: BoxDecoration(
color: Colors.blue,
border: Border.all(
color: Colors.red,
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
|
容器子元素
|