didChange method

  1. @override
void didChange(
  1. PhoneNumber? value
)
override

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

@override
void didChange(PhoneNumber? value) {
  if (value == null) {
    return;
  }
  super.didChange(value);

  if (controller.value != value) {
    controller.value = value;
  }
}