selectButton method
void
selectButton(
- T selectedValue
This function will select the button and update the state
THis can be access from outside to change the selected value programatically
Please note that this will also call the checkBoxButtonValues
callback
Implementation
void selectButton(T selectedValue) {
if (selectedValues.contains(selectedValue)) {
selectedValues.remove(selectedValue);
} else {
selectedValues.add(selectedValue);
}
if (mounted) setState(() {});
widget.checkBoxButtonValues(selectedValues);
}