forzeDownload method
dynamic
forzeDownload(
{ - required int tokenDownload,
- String rename = '',
})
Implementation
forzeDownload({required int tokenDownload, String rename = ''}) {
SelectDownload selectDow = checkDownload(tokenDownload);
if (!selectDow.exists) false;
TokenDownloadStatus status = selectDow.status!;
SelectTask st = _selectIsolate(status.isolateToken);
if (st.exists) {
TaskDownload dw = st.task!;
dw.sendPort.send(
ManMessagePort(
action: 'forceStart',
download: ManReques(
setting: ManSettings(),
url: '',
tokenDownload: tokenDownload,
fileName: rename,
),
),
);
return true;
} else {
return false;
}
}