Chip constructor
- Key? key,
- Widget? avatar,
- required Widget label,
- TextStyle? labelStyle,
- EdgeInsetsGeometry? labelPadding,
- Widget? deleteIcon,
- VoidCallback? onDeleted,
- Color? deleteIconColor,
- String? deleteButtonTooltipMessage,
- BorderSide? side,
- OutlinedBorder? shape,
- Clip clipBehavior = Clip.none,
- FocusNode? focusNode,
- bool autofocus = false,
- MaterialStateProperty<
Color?> ? color, - Color? backgroundColor,
- EdgeInsetsGeometry? padding,
- VisualDensity? visualDensity,
- MaterialTapTargetSize? materialTapTargetSize,
- double? elevation,
- Color? shadowColor,
- Color? surfaceTintColor,
- IconThemeData? iconTheme,
- BoxConstraints? avatarBoxConstraints,
- BoxConstraints? deleteIconBoxConstraints,
- ChipAnimationStyle? chipAnimationStyle,
Creates a Material Design chip.
The elevation must be null or non-negative.
Implementation
const Chip({
super.key,
this.avatar,
required this.label,
this.labelStyle,
this.labelPadding,
this.deleteIcon,
this.onDeleted,
this.deleteIconColor,
this.deleteButtonTooltipMessage,
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.avatarBoxConstraints,
this.deleteIconBoxConstraints,
this.chipAnimationStyle,
}) : assert(elevation == null || elevation >= 0.0);