DecoratedBox:用于设置装饰,给子元素设置背景、边框、渐变
DecorationedBox:( decoration:BoxDecoration( color:Colors...., image: border:Border.all( color:Color...., width:3.0, style:BorderStyle.solid ),
borderRadius:BorderRadius.circular(3.0),
boxShadow:[
BoxShadow:()
],
gradient:LinearGradient(
colors:[
Color.fromRGBO(3,111,255,1.0),
Color.fromRGBO(3,121,255,1.0),
],
begin:Alignment.topCenter,
end:Alignment.bottomCenter
)
shape:BoxShape.rectangle(circle)
)
)
border:取值
border:Border( top:BorderSide( color:Colors..., width:3.0, style:Border.solid ) ) border:Border.all( color:, width: style:Border.solid )
borderRadius:圆角取值
borderRadius:BorderRadius.only( topLeft:Radius.circular(12.0), ... ) borderRadius:BorderRadius.circular(12.0)
boxShadow:阴影
boxShadow:[ BoxShadow:( color://阴影颜色 offset:Offset(12.0,11.0),//偏移位置 blurRadius:4.0,//阴影模糊程度 spreadRadius:+-3.0//阴影扩散程度 ) ]