Container({
Key? key,
this.alignment,
this.padding,
this.color,
this.decoration,
this.foregroundDecoration,
double? width,
double? height,
BoxConstraints? constraints,
this.margin,
this.transform,
this.transformAlignment,
this.child,
this.clipBehavior = Clip.none,
})
Container(
//约束盒子最大最小宽高
constraints: new BoxConstraints(
minHeight: 100, maxHeight: 200, minWidth: 100, maxWidth: 200),
margin: EdgeInsets.all(10.0),
padding: EdgeInsets.all(30.0),
alignment: Alignment.bottomRight,
decoration: new BoxDecoration(
color: Colors.green,
//设置四周圆角 角度
borderRadius: BorderRadius.all(Radius.circular(4.0)),
//设置四周边框
border: new Border.all(width: 4, color: Colors.red),
boxShadow: [
BoxShadow(
offset: Offset(2, 1), //x,y轴
color: Colors.indigo, //投影颜色
blurRadius: 30, //模糊半径
blurStyle: BlurStyle.normal, //模糊风格
spreadRadius: 20 //扩展半径
)
],
image: new DecorationImage(
image: new NetworkImage(
'https://semantic-ui.com/images/avatar2/large/kristy.png'),
),
),
transform: new Matrix4.rotationY(0),
child: Text('内容'),
),