setValue method

  1. @protected
void setValue (
  1. T newValue
)
@protected

Sets the value associated with this form field.

This method should only be called by subclasses that need to update the 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

@protected
void setValue(T newValue) {
  value = newValue;
}