From 198393d4393605f5631a72d2b5f1841df509736e Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Thu, 24 Aug 2023 22:08:33 +0200 Subject: [PATCH] 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 --- packages/nextcloud/lib/src/webdav/client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextcloud/lib/src/webdav/client.dart b/packages/nextcloud/lib/src/webdav/client.dart index 6d1b49b0..87fc020e 100644 --- a/packages/nextcloud/lib/src/webdav/client.dart +++ b/packages/nextcloud/lib/src/webdav/client.dart @@ -189,7 +189,7 @@ class WebDavClient { file.openRead().map((final chunk) { uploaded += chunk.length; onProgress?.call(uploaded / fileStat.size); - return Uint8List.fromList(chunk); + return chunk as Uint8List; }), path, lastModified: lastModified,