From 29c42becd66b263d66ee64e0995c3c76d5185dd8 Mon Sep 17 00:00:00 2001 From: Maxr1998 Date: Sat, 14 Sep 2024 01:36:26 +0200 Subject: [PATCH] Fix aspect ratio of non-square offline images Offline images were previously resized with a policy of exact, which caused them to be weirdly stretched if they weren't square. Setting the policy to fit fixes this issue. --- lib/services/album_image_provider.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/services/album_image_provider.dart b/lib/services/album_image_provider.dart index a0979c791..7d15d45ae 100644 --- a/lib/services/album_image_provider.dart +++ b/lib/services/album_image_provider.dart @@ -84,8 +84,12 @@ final AutoDisposeProviderFamily // This helps keep cache usage by fileImages in check // Caching smaller at 2X size results in blurriness comparable to // NetworkImages fetched with display size - out = ResizeImage(out, - width: request.maxWidth! * 2, height: request.maxHeight! * 2); + out = ResizeImage( + out, + width: request.maxWidth! * 2, + height: request.maxHeight! * 2, + policy: ResizeImagePolicy.fit, + ); } return out; });