cancel method

void cancel()

Requests cancellation. Safe to call at any time; a no-op once the upload has completed.

Implementation

void cancel() => _cancelled = true;