cancel method
Cancel any pending or in-flight fetch request for this query.
Cancelling a query will:
- Cancel the active network request via ZenCancelToken
- Complete and cancel any active retry backoff timer
- Reset fetchStatus back to ZenQueryFetchStatus.idle
- Reset isLoading back to false
Implementation
@override
void cancel([String reason = 'Query cancelled']) {
_cancelPageRequest(isNext: true, reason: reason);
_cancelPageRequest(isNext: false, reason: reason);
if (!isDisposed) {
isFetchingNextPage.value = false;
isFetchingPreviousPage.value = false;
}
super.cancel(reason);
}