withSuccessful method
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;
}