cancelRequest abstract method
Cancels all in-flight requests.
Call this when leaving a screen to abort any pending requests that are
no longer needed (e.g. in onClose / dispose).
Example:
@override
void onClose() {
_api.cancelRequest(cancellationReason: 'Screen closed');
super.onClose();
}
Implementation
void cancelRequest({String cancellationReason = ''});