Browse Source

perf(nextcloud): read file as Uint8List

according to comment by a dart dev: https://stackoverflow.com/questions/73478943/flutter-dart-read-portions-of-file-as-bytes-rather-than-listint#comment129764806_73478943
it will allways return Uint8List
Signed-off-by: Nikolas Rimikis <rimikis.nikolas@gmail.com>
pull/592/head
Nikolas Rimikis 1 year ago
parent
commit
198393d439
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 2
      packages/nextcloud/lib/src/webdav/client.dart

2
packages/nextcloud/lib/src/webdav/client.dart

@ -189,7 +189,7 @@ class WebDavClient {
file.openRead().map((final chunk) { file.openRead().map((final chunk) {
uploaded += chunk.length; uploaded += chunk.length;
onProgress?.call(uploaded / fileStat.size); onProgress?.call(uploaded / fileStat.size);
return Uint8List.fromList(chunk); return chunk as Uint8List;
}), }),
path, path,
lastModified: lastModified, lastModified: lastModified,

Loading…
Cancel
Save