reset method Null safety

void reset()

Resets the field to its initial value.

Implementation

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