checkboxGroupValue<T> method

T? checkboxGroupValue<T>(
  1. String fieldName
)

Retrieves the first selected value of a checkbox group for a specified fieldName.

This method simplifies fetching the first selected checkbox value.

  • Parameter fieldName The name of the field to fetch.
  • Returns: The first selected value or null if none are selected.
  • Throws: ArgumentError if the field doesn't exist.

Implementation

T? checkboxGroupValue<T>(String fieldName) {
  return checkboxValues<T>(fieldName).firstOrNull;
}