withMessage method

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

Sets a message and status for the response.

message: Message to be set. status: Status of the response. Returns the modified Response object with updated message and status.

Implementation

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