mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
Fixes aspect ratio calculation
This commit is contained in:
parent
04350f262a
commit
b0ff859cd6
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ class MemoryCard extends StatelessWidget {
|
||||||
// Determine the fit using the aspect ratio
|
// Determine the fit using the aspect ratio
|
||||||
BoxFit fit = BoxFit.fitWidth;
|
BoxFit fit = BoxFit.fitWidth;
|
||||||
if (asset.width != null && asset.height != null) {
|
if (asset.width != null && asset.height != null) {
|
||||||
final aspectRatio = asset.height! / asset.width!;
|
final aspectRatio = asset.width! / asset.height!;
|
||||||
final phoneAspectRatio =
|
final phoneAspectRatio =
|
||||||
constraints.maxWidth / constraints.maxHeight;
|
constraints.maxWidth / constraints.maxHeight;
|
||||||
// Look for a 25% difference in either direction
|
// Look for a 25% difference in either direction
|
||||||
|
|
Loading…
Add table
Reference in a new issue