setError method

void setError(
  1. String error
)

Sets the error message manually and marks state as error.

Implementation

void setError(String error) {
  _error.value = error;
  _state.value = AsyncState.error;
}