clearError method

  1. @override
void clearError()
override

Clears the validation error without changing the field value.

Similar to Flutter's FormFieldState.clearError.

Implementation

@override
void clearError() {
  if (!state.hasError) return;

  emit(state.copyWith(
    error: Param(null),
    isValidated: false,
  ) as State);
}