中文翻译为碎片的意思,一般也是用作商品或者一些东西的标签。
Chip({
Key key,
this.avatar,
@required this.label,
this.labelStyle,
this.labelPadding,
this.deleteIcon,
this.onDeleted,
this.deleteIconColor,
this.deleteButtonTooltipMessage,
this.shape,
this.clipBehavior = Clip.none,
this.backgroundColor,
this.padding,
this.materialTapTargetSize,
})avatar: Icon(
Icons.arrow_forward,
color: Colors.black54,
),label: Text("chip"),labelStyle: TextStyle(color: Colors.black54),labelPadding: EdgeInsets.all(15.0),deleteIcon: Icon(Icons.close),onDeleted: () {
print("点击了删除噢");
},deleteIconColor: Colors.black54,deleteButtonTooltipMessage: "弹出提示",shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(2.0),
),backgroundColor: Colors.orange,padding: EdgeInsets.all(15.0),materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,