clearError method

void clearError()

Clears the error state without retrying.

This is useful when you want to dismiss the error UI without triggering a retry.

Implementation

void clearError() {
  _lastFetchWasError = false;
  _lastError = null;

  final currentState = state;
  if (currentState is SmartPaginationLoaded<T> && currentState.loadMoreError != null) {
    emit(currentState.copyWith(loadMoreError: null));
  }
}