withValid method
Sets the validity status of the response.
valid
: Indicates if the response is valid.
Returns the modified Response object with updated validity status.
Implementation
Response<T> withValid(bool valid) {
_valid = valid;
_loading = false;
return this;
}