From 894a922b8f007fd0db84bcc78eb599aea548d94f Mon Sep 17 00:00:00 2001 From: nyne Date: Mon, 1 Sep 2025 20:55:15 +0800 Subject: [PATCH] fix js api `onResponse` --- lib/network/images.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/network/images.dart b/lib/network/images.dart index 74749ac..8255e97 100644 --- a/lib/network/images.dart +++ b/lib/network/images.dart @@ -71,7 +71,8 @@ abstract class ImageDownloader { } if (configs['onResponse'] is JSInvokable) { - buffer = (configs['onResponse'] as JSInvokable)([buffer]); + final uint8List = Uint8List.fromList(buffer); + buffer = (configs['onResponse'] as JSInvokable)([uint8List]); (configs['onResponse'] as JSInvokable).free(); }