submit method

  1. @override
void submit()
override

Submits this ReactiveFieldState.

Implementation

@override
void submit() {
  if (editable.isTrue && submittable.isTrue) {
    if (controller.text != _previousSubmit) {
      if (_previousText != controller.text) {
        _previousText = controller.text;
        onChanged?.call(this);
        onFocus?.call(this);
      }

      if (error.value == null || resubmitOnError.isTrue) {
        error.value = null;
        resubmitOnError.value = false;
        _previousSubmit = controller.text;
        onSubmitted?.call(this);
        changed.value = false;
      }
    }
  }
}