withFailed method

Response<T> withFailed(
  1. bool failed
)

Sets the response as failed.

failed: Indicates if the operation failed. Returns the modified Response object with updated failed status.

Implementation

Response<T> withFailed(bool failed) {
  _failed = failed;
  _loading = false;
  return this;
}