/**
* 碎片,一般是用作标签
const Chip({
Key key,
this.avatar,//标签左侧Widget,一般为小图标
@required this.label,//标签
this.labelStyle,
this.labelPadding,
this.deleteIcon,//删除图标
this.onDeleted,//删除回调,为空时不显示删除图标
this.deleteIconColor,//删除图标的颜
this.deleteButtonTooltipMessage,//删除按钮的tip文字
this.shape,//形状.默认两端是半圆形
this.clipBehavior = Clip.none
this.backgroundColor,//背景颜色
this.padding,
this.materialTapTargetSize,//设置为MaterialTapTargetSize.shrinkWrap时,clip距顶部距离为0;设置为MaterialTapTargetSize.padded时距顶部有一个距离
})
*/
body: Chip(
label: Text("chip组件", style: TextStyle(fontSize: 15.0,
color: Color(0xff333333),
fontStyle: FontStyle.italic),),
labelPadding: EdgeInsets.only(left: 3.0),
avatar: Icon(Icons.home, color: Color(0xff00ff00),),
onDeleted: () {},
deleteIcon: Icon(Icons.delete),
deleteIconColor: Color(0xffff0000),
deleteButtonTooltipMessage: "手下留情",
backgroundColor: Color(0xfff1f1f1),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0)
),
materialTapTargetSize: MaterialTapTargetSize.padded,
),
码云地址:https://gitee.com/xgljh/Flutter.git
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。