Chip constructor

const Chip(
  1. {Key key,
  2. Widget avatar,
  3. @required Widget label,
  4. TextStyle labelStyle,
  5. EdgeInsetsGeometry labelPadding,
  6. Widget deleteIcon,
  7. VoidCallback onDeleted,
  8. Color deleteIconColor,
  9. String deleteButtonTooltipMessage,
  10. ShapeBorder shape,
  11. Clip clipBehavior: Clip.none,
  12. FocusNode focusNode,
  13. bool autofocus: false,
  14. Color backgroundColor,
  15. EdgeInsetsGeometry padding,
  16. VisualDensity visualDensity,
  17. MaterialTapTargetSize materialTapTargetSize,
  18. double elevation,
  19. 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);