ActionChip constructor

const ActionChip(
  1. {Key key,
  2. Widget avatar,
  3. @required Widget label,
  4. TextStyle labelStyle,
  5. EdgeInsetsGeometry labelPadding,
  6. @required VoidCallback onPressed,
  7. double pressElevation,
  8. String tooltip,
  9. ShapeBorder shape,
  10. Clip clipBehavior: Clip.none,
  11. FocusNode focusNode,
  12. bool autofocus: false,
  13. Color backgroundColor,
  14. EdgeInsetsGeometry padding,
  15. VisualDensity visualDensity,
  16. MaterialTapTargetSize materialTapTargetSize,
  17. double elevation,
  18. Color shadowColor}
)

Create a chip that acts like a button.

The label, onPressed, 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 ActionChip({
  Key key,
  this.avatar,
  @required this.label,
  this.labelStyle,
  this.labelPadding,
  @required this.onPressed,
  this.pressElevation,
  this.tooltip,
  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(clipBehavior != null),
     assert(autofocus != null),
     assert(
       onPressed != null,
       'Rather than disabling an ActionChip by setting onPressed to null, '
       'remove it from the interface entirely.',
     ),
     assert(pressElevation == null || pressElevation >= 0.0),
     assert(elevation == null || elevation >= 0.0),
     super(key: key);