A constructor
Const Chip({Key Key, this.avatar,// left widget @required this.label,// Display content this.labelStyle, this.labelPadding, Enclosing deleteIcon, / / a widget on the right side of the enclosing onDeleted, / / on the right side of the widget click callback methods enclosing deleteIconColor, enclosing deleteButtonTooltipMessage, This shape, this. ClipBehavior = Clip. None, enclosing backgroundColor, / / label the background color of this. The padding, enclosing materialTapTargetSize, This.elevation,// shadow size this.elevation,// shadowColor})Copy the code
The sample

code
class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Chip( label: Text("I am a Chip"), avatar: Icon(Icons.add_alarm), deleteIcon: Icon(Icons.delete), deleteButtonTooltipMessage: "delete", deleteIconColor: Colors.red[200], onDeleted: (){ print("delete"); }, backgroundColor: Colors.orange[100], padding: EdgeInsets.symmetric(horizontal: 15), elevation: 10, shadowColor: Colors.orange, ), ], ), ), ); }}Copy the code