MultiSelectChip constructor

const MultiSelectChip({
  1. Key? key,
  2. AbstractButtonStyle style = const ButtonStyle.primary(),
  3. required Object? value,
  4. required Widget child,
})

Creates a MultiSelectChip.

Designed to be used within multi-select components where it automatically integrates with the parent selection state for removal functionality.

Parameters:

  • value (Object?, required): the value this chip represents in the selection
  • child (Widget, required): content displayed inside the chip
  • style (AbstractButtonStyle, default: primary): chip styling

Example:

MultiSelectChip(
  value: user.id,
  child: Row(
    children: [
      Avatar(user: user),
      Text(user.name),
    ],
  ),
  style: ButtonStyle.secondary(),
)

Implementation

const MultiSelectChip({
  super.key,
  this.style = const ButtonStyle.primary(),
  required this.value,
  required this.child,
});