Flutter ChoiceChip selected Text color

Viewed 1765

How to set a specific color to the text of the selected chip with a ChoiceChip widget ? "selectedColor" is only setting the background color of the selected chip.

1 Answers

Use labelStyle property to set text-color of ChoiceChip.

ChoiceChip(
  label: Text('Hi'),
  selected: isSelected,
  labelStyle: TextStyle(
    color: isSelected ? Colors.blue : Colors.red,
  ),
),
Related