withCancel method
Sets the response as cancelled and optionally provides a cancellation message.
cancel
: Indicates if the response is cancelled.
message
: Cancellation message.
Returns the modified Response object with updated cancellation status.
Implementation
Response<T> withCancel(bool cancel, {String? message}) {
_cancel = cancel;
_loading = false;
_message = message;
return this;
}