withSuccessful method

Response<T> withSuccessful(
  1. bool successful, {
  2. String? message,
})

Sets the success status of the response.

successful: Indicates if the operation was successful. message: Additional message. Returns the modified Response object with updated success status.

Implementation

Response<T> withSuccessful(bool successful, {String? message}) {
  _status = Status.ok;
  _successful = successful;
  _message = message;
  _complete = true;
  _loading = false;
  return this;
}