cancel method Null safety

Future cancel()

Cancels this operation.

If this operation isComplete or isCanceled this call is ignored. Returns the result of the onCancel callback, if one exists.

Implementation

Future cancel() => _completer._cancel();