ChipDecoration constructor

const ChipDecoration({
  1. Icon? deleteIcon,
  2. Color? backgroundColor = const Color(0xFFE0E0E0),
  3. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
  4. BoxBorder border = const Border(),
  5. double spacing = 8,
  6. double runSpacing = 12,
  7. TextStyle? labelStyle,
  8. BorderRadiusGeometry borderRadius = const BorderRadius.all(Radius.circular(12)),
  9. bool wrap = true,
})

Creates a new instance of ChipDecoration.

deleteIcon is the icon to display for deleting a chip.

backgroundColor is the background color of the chip.

labelStyle is the style of the chip label.

padding is the padding around the chip.

border is the border of the chip.

spacing is the spacing between chips.

runSpacing is the spacing between chip rows (when the chips wrap).

borderRadius is the border radius of the chip.

wrap is whether to wrap or not.

Implementation

const ChipDecoration({
  this.deleteIcon,
  this.backgroundColor = const Color(0xFFE0E0E0),
  this.padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
  this.border = const Border(),
  this.spacing = 8,
  this.runSpacing = 12,
  this.labelStyle,
  this.borderRadius = const BorderRadius.all(Radius.circular(12)),
  this.wrap = true,
});