resume method
Resumes the task.
Returns: A Future that resolves to true if resumed successfully.
Implementation
Future<bool> resume() async {
await _initFuture;
if (_helper.runtimeType == DownloadTaskController) {
return false;
}
if (this._snapshot.state == TaskState.success ||
this._snapshot.state == TaskState.canceled ||
this.snapshot.state == TaskState.error ||
this._snapshot.state == TaskState.running) {
return false;
}
if (_helper is DownloadTaskController) {
return false;
}
await __changeState(TaskState.running);
this.__runUpload();
return true;
}