ActionChip constructor
- Key? key,
- Widget? avatar,
- required Widget label,
- TextStyle? labelStyle,
- EdgeInsetsGeometry? labelPadding,
- VoidCallback? onPressed,
- double? pressElevation,
- String? tooltip,
- BorderSide? side,
- OutlinedBorder? shape,
- Clip clipBehavior = Clip.none,
- FocusNode? focusNode,
- bool autofocus = false,
- MaterialStateProperty<
Color?> ? color, - Color? backgroundColor,
- Color? disabledColor,
- EdgeInsetsGeometry? padding,
- VisualDensity? visualDensity,
- MaterialTapTargetSize? materialTapTargetSize,
- double? elevation,
- Color? shadowColor,
- Color? surfaceTintColor,
- IconThemeData? iconTheme,
- BoxConstraints? avatarBoxConstraints,
- 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;