clearErrors method

void clearErrors()

Implementation

void clearErrors() {
  if (state.errorMessage != null ||
      state.currentHasError ||
      state.newHasError ||
      state.confirmHasError) {
    state = const ChangePasswordState();
  }
}