Chip constructor
- {Key key,
- Widget avatar,
- @required Widget label,
- TextStyle labelStyle,
- EdgeInsetsGeometry labelPadding,
- Widget deleteIcon,
- VoidCallback onDeleted,
- Color deleteIconColor,
- String deleteButtonTooltipMessage,
- ShapeBorder shape,
- Clip clipBehavior: Clip.none,
- FocusNode focusNode,
- bool autofocus: false,
- Color backgroundColor,
- EdgeInsetsGeometry padding,
- VisualDensity visualDensity,
- MaterialTapTargetSize materialTapTargetSize,
- double elevation,
- Color shadowColor}
Creates a material design chip.
The label
, autofocus
, and clipBehavior
arguments must not be null.
The elevation
must be null or non-negative.
Implementation
const 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.focusNode,
this.autofocus = false,
this.backgroundColor,
this.padding,
this.visualDensity,
this.materialTapTargetSize,
this.elevation,
this.shadowColor,
}) : assert(label != null),
assert(autofocus != null),
assert(clipBehavior != null),
assert(elevation == null || elevation >= 0.0),
super(key: key);