setValueSilently method
void
setValueSilently(
- T? value
Sets the value of the selected item in this
controller's radio group
without calling the onChanged
callback.
@throws IllegalValueException If the value
provided is not a value in
the radio group's values list.
@throws ControllerDecoupledException If the controller cannot access the value of its radio group.
Implementation
void setValueSilently(T? value) {
if (_myRadioGroup != null) {
if (value != null && !_myRadioGroup!.widget.values.contains(value)) {
throw IllegalValueException(value: value);
}
_myRadioGroup!.setValueSilently(value);
return;
}
// If it makes it to this point, something has gone wrong.
throw ControllerDecoupledException(radioGroupController: this);
}