ActionChip constructor

const ActionChip({
  1. Key? key,
  2. Widget? avatar,
  3. required Widget label,
  4. TextStyle? labelStyle,
  5. EdgeInsetsGeometry? labelPadding,
  6. VoidCallback? onPressed,
  7. double? pressElevation,
  8. String? tooltip,
  9. BorderSide? side,
  10. OutlinedBorder? shape,
  11. Clip clipBehavior = Clip.none,
  12. FocusNode? focusNode,
  13. bool autofocus = false,
  14. MaterialStateProperty<Color?>? color,
  15. Color? backgroundColor,
  16. Color? disabledColor,
  17. EdgeInsetsGeometry? padding,
  18. VisualDensity? visualDensity,
  19. MaterialTapTargetSize? materialTapTargetSize,
  20. double? elevation,
  21. Color? shadowColor,
  22. Color? surfaceTintColor,
  23. IconThemeData? iconTheme,
  24. BoxConstraints? avatarBoxConstraints,
  25. ChipAnimationStyle? chipAnimationStyle,
})

Create a chip that acts like a button.

The label, autofocus, and clipBehavior arguments must not be null. When onPressed is null, the ActionChip will be disabled. The pressElevation and elevation must be null or non-negative. Typically, pressElevation is greater than elevation.

Implementation

const ActionChip({
  super.key,
  this.avatar,
  required this.label,
  this.labelStyle,
  this.labelPadding,
  this.onPressed,
  this.pressElevation,
  this.tooltip,
  this.side,
  this.shape,
  this.clipBehavior = Clip.none,
  this.focusNode,
  this.autofocus = false,
  this.color,
  this.backgroundColor,
  this.disabledColor,
  this.padding,
  this.visualDensity,
  this.materialTapTargetSize,
  this.elevation,
  this.shadowColor,
  this.surfaceTintColor,
  this.iconTheme,
  this.avatarBoxConstraints,
  this.chipAnimationStyle,
}) : assert(pressElevation == null || pressElevation >= 0.0),
     assert(elevation == null || elevation >= 0.0),
     _chipVariant = _ChipVariant.flat;