checkboxSelected<T> method
Checks if a specific value is selected within a checkbox group.
This method checks if a specific checkbox value is selected.
- Parameter
fieldNameThe name of the checkbox group. - Parameter
valueThe specific value to check for. - Returns:
trueif the checkbox with the given value is selected, otherwisefalse. - Throws: ArgumentError if the field doesn't exist.
Implementation
bool checkboxSelected<T>(String fieldName, T value) {
return checkboxValues<T>(fieldName).contains(value);
}