reset method

void reset()

Resets the field to its initial value.

Implementation

void reset() {
  setState(() {
    _value = widget.initialValue;
    _hasInteractedByUser.value = false;
    _errorText.value = null;
  });
  Form.maybeOf(context)?._fieldDidChange();
}