clarify parameter

This commit is contained in:
mertalev
2026-01-17 03:24:40 -05:00
parent e739aa1667
commit f98b441100
4 changed files with 4 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ abstract class ImageRequest {
void _onCancelled();
Future<ui.FrameInfo?> _fromPlatformImage(Map<String, int> info, bool shouldFree) async {
Future<ui.FrameInfo?> _fromPlatformImage(Map<String, int> info, {required bool shouldFree}) async {
final address = info['pointer'];
if (address == null) {
return null;

View File

@@ -24,7 +24,7 @@ class LocalImageRequest extends ImageRequest {
isVideo: assetType == AssetType.video,
);
final frame = await _fromPlatformImage(info, true);
final frame = await _fromPlatformImage(info, shouldFree: true);
return frame == null ? null : ImageInfo(image: frame.image, scale: scale);
}

View File

@@ -15,7 +15,7 @@ class RemoteImageRequest extends ImageRequest {
final Map<String, int> info = await remoteImageApi.requestImage(uri, headers: headers, requestId: requestId);
try {
final frame = await _fromPlatformImage(info, Platform.isIOS);
final frame = await _fromPlatformImage(info, shouldFree: Platform.isIOS);
return frame == null ? null : ImageInfo(image: frame.image, scale: scale);
} finally {
if (Platform.isAndroid) {

View File

@@ -12,7 +12,7 @@ class ThumbhashImageRequest extends ImageRequest {
}
final Map<String, int> info = await localImageApi.getThumbhash(thumbhash);
final frame = await _fromPlatformImage(info, true);
final frame = await _fromPlatformImage(info, shouldFree: true);
return frame == null ? null : ImageInfo(image: frame.image, scale: scale);
}