cancel static method
Cancels download task with id taskId
.
Implementation
static Future<void> cancel({required String taskId}) async {
assert(_initialized, 'plugin flutter_downloader is not initialized');
try {
await _channel.invokeMethod<void>('cancel', {'task_id': taskId});
} on PlatformException catch (err) {
_log(err.message);
}
}