cancel method
Cancels the execution of the job that will complete this future. This method returns as soon as the job has been notified of the cancellation request, however note that this does not mean that the job has been cancelled or will be cancelled. Jobs can only be cancelled while they are performing certain operations (for example while performing web requests). If the job has received a cancellation request, but the job does not perform any more cancellable operations before completion the future will be completed normally (with a success or error, but not with a cancellation).
When the job cancels any task waiting for this future result will receive a TODO what error?
If the job already terminated (successfully, with an error, or due to cancellation) cancel has no effect.
Implementation
Future<void> cancel() async {
await CardinalSdkPlatformInterface.instance.utils.cancelJob(this._cancellationToken);
}