updateRadioGroupItems<T> method
Updates a RadioGroupFieldState with a list of RadioButtonFieldState items.
fieldNameThe name of the radio group field to update.itemsThe 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,
);
}