didChange method Null safety
- T? value
Updates this field's state to the new value. Useful for responding to child widget changes, e.g. Slider's Slider.onChanged argument.
Triggers the Form.onChanged callback and, if Form.autovalidateMode is AutovalidateMode.always or AutovalidateMode.onUserInteraction, revalidates all the fields of the form.
Implementation
void didChange(T? value) {
setState(() {
_value = value;
_hasInteractedByUser.value = true;
});
Form.of(context)?._fieldDidChange();
}