cancel method
void
cancel()
Cancels the request.
If the request is in-flight, the success or error callbacks will not be called. Polling will also be stopped.
Implementation
void cancel() {
_canceled = true;
loading.value = false;
_pollingTimer?.cancel();
_pollingTimer = null;
}