InputChip constructor

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

Creates an InputChip.

The onPressed and onSelected callbacks must not both be specified at the same time. When both onPressed and onSelected are null, the chip will be disabled.

The pressElevation and elevation must be null or non-negative. Typically, pressElevation is greater than elevation.

Implementation

const InputChip({
  super.key,
  this.avatar,
  required this.label,
  this.labelStyle,
  this.labelPadding,
  this.selected = false,
  this.isEnabled = true,
  this.onSelected,
  this.deleteIcon,
  this.onDeleted,
  this.deleteIconColor,
  this.deleteButtonTooltipMessage,
  this.onPressed,
  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(),
  this.avatarBoxConstraints,
  this.deleteIconBoxConstraints,
  this.chipAnimationStyle,
}) : assert(pressElevation == null || pressElevation >= 0.0),
     assert(elevation == null || elevation >= 0.0);