withResult method

Response<T> withResult(
  1. List<T>? result, {
  2. String? message,
  3. Status? status,
})

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