FilterChip constructor
- Key? key,
- Widget? avatar,
- required Widget label,
- TextStyle? labelStyle,
- EdgeInsetsGeometry? labelPadding,
- bool selected = false,
- required ValueChanged<
bool> ? onSelected, - Widget? deleteIcon,
- VoidCallback? onDeleted,
- Color? deleteIconColor,
- String? deleteButtonTooltipMessage,
- double? pressElevation,
- Color? disabledColor,
- Color? selectedColor,
- String? tooltip,
- 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,
- Color? selectedShadowColor,
- bool? showCheckmark,
- Color? checkmarkColor,
- ShapeBorder avatarBorder = const CircleBorder(),
- BoxConstraints? avatarBoxConstraints,
- BoxConstraints? deleteIconBoxConstraints,
- ChipAnimationStyle? chipAnimationStyle,
Create a chip that acts like a checkbox.
The selected, label, autofocus, and clipBehavior arguments must not be null. When onSelected is null, the FilterChip will be disabled. The pressElevation and elevation must be null or non-negative. Typically, pressElevation is greater than elevation.
Implementation
const FilterChip({
super.key,
this.avatar,
required this.label,
this.labelStyle,
this.labelPadding,
this.selected = false,
required this.onSelected,
this.deleteIcon,
this.onDeleted,
this.deleteIconColor,
this.deleteButtonTooltipMessage,
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),
_chipVariant = _ChipVariant.flat;