TChoiceChip constructor

const TChoiceChip({
  1. Key? key,
  2. required String text,
  3. required bool selected,
  4. void onSelected(
    1. bool
    )?,
  5. Color? backgroundColor,
  6. Color? selectedTextColor,
  7. Color? unselectedTextColor,
  8. OutlinedBorder? borderShape,
  9. Widget? customCheckmarkIcon,
  10. bool showCheckmark = true,
  11. bool isColorAttribute = false,
})

Create a chip that acts like a radio button.

Parameters:

  • text: The label text for the chip.
  • selected: Whether the chip is currently selected.
  • onSelected: Callback function when the chip is selected.
  • backgroundColor: Optional background color for the chip.
  • selectedTextColor: Text color when the chip is selected.
  • unselectedTextColor: Text color when the chip is not selected.
  • borderShape: Optional shape for the chip border.
  • isColorAttribute: If true, the chip represents a color value.

Implementation

const TChoiceChip({
  super.key,
  required this.text,
  required this.selected,
  this.onSelected,
  this.backgroundColor,
  this.selectedTextColor,
  this.unselectedTextColor,
  this.borderShape,
  this.customCheckmarkIcon,
  this.showCheckmark = true,
  this.isColorAttribute = false,
});