void onChanged(T value)

Updates this field's state to the new value. Useful for responding to child widget changes, e.g. Slider's onChanged argument.

Source

void onChanged(T value) {
  setState(() {
    _value = value;
  });
  Form.of(context)?._fieldDidChange();
}