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
fieldName
The name of the checkbox group. - Parameter
value
The specific value to check for. - Returns:
true
if 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);
}