withResult method
Sets the result list and associated properties with the response.
result
: List of results.
message
: Additional message.
status
: Status of the response.
Returns the modified Response object with updated result list.
Implementation
Response<T> withResult(List<T>? result, {String? message, Status? status}) {
_status = status ?? Status.ok;
_result = result;
_message = message;
_successful = true;
_complete = true;
_loading = false;
return this;
}