1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

Fixes aspect ratio calculation

This commit is contained in:
Marty Fuhry 2024-02-04 20:38:01 -05:00
parent 04350f262a
commit b0ff859cd6
No known key found for this signature in database
GPG key ID: E2AB6392D894D900

View file

@ -66,7 +66,7 @@ class MemoryCard extends StatelessWidget {
// Determine the fit using the aspect ratio
BoxFit fit = BoxFit.fitWidth;
if (asset.width != null && asset.height != null) {
final aspectRatio = asset.height! / asset.width!;
final aspectRatio = asset.width! / asset.height!;
final phoneAspectRatio =
constraints.maxWidth / constraints.maxHeight;
// Look for a 25% difference in either direction