pause method
Implementation
bool pause(int tokenDownload) {
SelectDownload selectDow = checkDownload(tokenDownload);
if (!selectDow.exists) false;
TokenDownloadStatus status = selectDow.status!;
SelectTask st = _selectIsolate(status.isolateToken);
if (!st.exists) false;
TaskDownload dw = st.task!;
if (dw.statusIsolate == StatusIsolateType.downloading) {
dw.resume = dw.root.pause();
dw.statusIsolate = StatusIsolateType.pause;
selectDow.status!.status = DownloadType.pause;
return true;
}
return false;
}