clearError method

void clearError()

Clears any existing error from the state.

Implementation

void clearError() {
  if (state.hasError) {
    state = state.copyWith(status: AuthStatus.unauthenticated, error: null);
  }
}