diff --git a/mobile/lib/infrastructure/loaders/image_request.dart b/mobile/lib/infrastructure/loaders/image_request.dart index f75e4c8797..14ab78ba09 100644 --- a/mobile/lib/infrastructure/loaders/image_request.dart +++ b/mobile/lib/infrastructure/loaders/image_request.dart @@ -35,7 +35,7 @@ abstract class ImageRequest { void _onCancelled(); - Future _fromPlatformImage(Map info, bool shouldFree) async { + Future _fromPlatformImage(Map info, {required bool shouldFree}) async { final address = info['pointer']; if (address == null) { return null; diff --git a/mobile/lib/infrastructure/loaders/local_image_request.dart b/mobile/lib/infrastructure/loaders/local_image_request.dart index ef092c9cb6..863a5cd802 100644 --- a/mobile/lib/infrastructure/loaders/local_image_request.dart +++ b/mobile/lib/infrastructure/loaders/local_image_request.dart @@ -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); } diff --git a/mobile/lib/infrastructure/loaders/remote_image_request.dart b/mobile/lib/infrastructure/loaders/remote_image_request.dart index 2c1f58adbf..b306ca272d 100644 --- a/mobile/lib/infrastructure/loaders/remote_image_request.dart +++ b/mobile/lib/infrastructure/loaders/remote_image_request.dart @@ -15,7 +15,7 @@ class RemoteImageRequest extends ImageRequest { final Map 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) { diff --git a/mobile/lib/infrastructure/loaders/thumbhash_image_request.dart b/mobile/lib/infrastructure/loaders/thumbhash_image_request.dart index 22a4aa8d7b..4cf7d545b5 100644 --- a/mobile/lib/infrastructure/loaders/thumbhash_image_request.dart +++ b/mobile/lib/infrastructure/loaders/thumbhash_image_request.dart @@ -12,7 +12,7 @@ class ThumbhashImageRequest extends ImageRequest { } final Map 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); }