updateRadioGroupItems<T> method

void updateRadioGroupItems<T>(
  1. String fieldName,
  2. List<RadioButtonFieldState<T>> items
)

Updates a RadioGroupFieldState with a list of RadioButtonFieldState items.

  • fieldName The name of the radio group field to update.
  • items The new list of radio button items for the radio group.

Implementation

void updateRadioGroupItems<T>(
  String fieldName,
  List<RadioButtonFieldState<T>> items,
) {
  state.fields[fieldName] = state.radioGroup<T>(fieldName).copyWith(
        radioButtons: items,
      );
}