FilterChip constructor

const FilterChip(
  1. {Key? key,
  2. Widget? avatar,
  3. required Widget label,
  4. TextStyle? labelStyle,
  5. EdgeInsetsGeometry? labelPadding,
  6. bool selected = false,
  7. required ValueChanged<bool>? onSelected,
  8. Widget? deleteIcon,
  9. VoidCallback? onDeleted,
  10. Color? deleteIconColor,
  11. String? deleteButtonTooltipMessage,
  12. double? pressElevation,
  13. Color? disabledColor,
  14. Color? selectedColor,
  15. String? tooltip,
  16. BorderSide? side,
  17. OutlinedBorder? shape,
  18. Clip clipBehavior = Clip.none,
  19. FocusNode? focusNode,
  20. bool autofocus = false,
  21. MaterialStateProperty<Color?>? color,
  22. Color? backgroundColor,
  23. EdgeInsetsGeometry? padding,
  24. VisualDensity? visualDensity,
  25. MaterialTapTargetSize? materialTapTargetSize,
  26. double? elevation,
  27. Color? shadowColor,
  28. Color? surfaceTintColor,
  29. IconThemeData? iconTheme,
  30. Color? selectedShadowColor,
  31. bool? showCheckmark,
  32. Color? checkmarkColor,
  33. ShapeBorder avatarBorder = const CircleBorder()}
)

Create a chip that acts like a checkbox.

The selected, label, autofocus, and clipBehavior arguments must not be null. The pressElevation and elevation must be null or non-negative. Typically, pressElevation is greater than elevation.

Implementation

const FilterChip({
  super.key,
  this.avatar,
  required this.label,
  this.labelStyle,
  this.labelPadding,
  this.selected = false,
  required this.onSelected,
  this.deleteIcon,
  this.onDeleted,
  this.deleteIconColor,
  this.deleteButtonTooltipMessage,
  this.pressElevation,
  this.disabledColor,
  this.selectedColor,
  this.tooltip,
  this.side,
  this.shape,
  this.clipBehavior = Clip.none,
  this.focusNode,
  this.autofocus = false,
  this.color,
  this.backgroundColor,
  this.padding,
  this.visualDensity,
  this.materialTapTargetSize,
  this.elevation,
  this.shadowColor,
  this.surfaceTintColor,
  this.iconTheme,
  this.selectedShadowColor,
  this.showCheckmark,
  this.checkmarkColor,
  this.avatarBorder = const CircleBorder(),
}) : assert(pressElevation == null || pressElevation >= 0.0),
     assert(elevation == null || elevation >= 0.0),
     _chipVariant = _ChipVariant.flat;