setValue method

  1. @override
void setValue(
  1. num? value, {
  2. bool populateForm = true,
})
inherited

Sets the value associated with this form field.

This method should only be called by subclasses that need to update the form field value due to state changes identified during the widget build phase, when calling setState is prohibited. In all other cases, the value should be set by a call to didChange, which ensures that setState is called.

Implementation

@override
void setValue(T? value, {bool populateForm = true}) {
  super.setValue(value);
  if (populateForm) {
    _informFormForFieldChange();
  }
}