/**
* 卡片布局,相当于Android中的CardView
* const Card({
Key key,
this.color,//背景色
this.elevation,//阴影大小
this.shape,//设置边,可以设置圆角
this.margin = const EdgeInsets.all(4.0),
this.clipBehavior = Clip.none,
this.child,
this.semanticContainer = true,
})
*/
body: Container(
width: 100.0,
height: 100.0,
margin: EdgeInsets.all(20.0),
child: Card(
color: Color(0xffff0000),
child: Text("Card组件"),
//设置圆角
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
//设置普通边
// shape: Border.all(
// color: Color(0xff00ff00),
// width: 2.0,
// ),
elevation: 10.0,
margin: EdgeInsets.all(10.0),
),
),
码云地址:https://gitee.com/xgljh/Flutter.git
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。