dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
+19 -15
View File
@@ -28,20 +28,24 @@ class FileDownloader {
required void Function() onDone,
required void Function(Object error) onError,
}) {
client.download(
url,
savePath,
cancelToken: _cancelToken,
onReceiveProgress: (received, total) {
if (_cancelled || total <= 0) return;
onProgress((received / total) * 100);
},
).then((_) {
if (_cancelled) return;
onDone();
}).catchError((Object error) {
if (_cancelled) return;
onError(error);
}).ignore();
client
.download(
url,
savePath,
cancelToken: _cancelToken,
onReceiveProgress: (received, total) {
if (_cancelled || total <= 0) return;
onProgress((received / total) * 100);
},
)
.then((_) {
if (_cancelled) return;
onDone();
})
.catchError((Object error) {
if (_cancelled) return;
onError(error);
})
.ignore();
}
}