withStatus method

Response<T> withStatus(
  1. Status status, {
  2. String? message,
})

Sets the status of the response.

status: Status to be set. message: Additional message. Returns the modified Response object with updated status.

Implementation

Response<T> withStatus(Status status, {String? message}) {
  _status = status;
  _successful = status.isSuccessful;
  _loading = false;
  _message = message;
  return this;
}