flutter-side decode

This commit is contained in:
mertalev
2026-01-17 23:46:46 -05:00
parent 24ff08e094
commit 00ea98479f
8 changed files with 106 additions and 123 deletions
@@ -13,15 +13,8 @@ class RemoteImageRequest extends ImageRequest {
}
final Map<String, int> info = await remoteImageApi.requestImage(uri, headers: headers, requestId: requestId);
try {
final frame = await _fromPlatformImage(info, shouldFree: Platform.isIOS);
return frame == null ? null : ImageInfo(image: frame.image, scale: scale);
} finally {
if (Platform.isAndroid) {
unawaited(remoteImageApi.releaseImage(requestId));
}
}
final frame = await _fromEncodedPlatformImage(info["pointer"]!, info["length"]!);
return frame == null ? null : ImageInfo(image: frame.image, scale: scale);
}
@override