File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,20 +16,20 @@ CropFitParams calculateCropParams({
16
16
switch (imageFit) {
17
17
case CustomImageFit .fitCropSpace:
18
18
final cropSize = min (screenWidth, screenHeight);
19
- final cropSizeToPaint = cropSize;
19
+ final cropSizeToPaint = cropSize * cropPercentage ;
20
20
final defaultScale = (cropSize * cropPercentage) / max (imageWidth, imageHeight);
21
21
22
22
return CropFitParams (cropSize, cropSizeToPaint, defaultScale);
23
23
24
24
case CustomImageFit .fillCropWidth:
25
25
final cropSize = screenWidth;
26
- final cropSizeToPaint = cropSize;
26
+ final cropSizeToPaint = cropSize * cropPercentage ;
27
27
final defaultScale = (cropSize * cropPercentage) / imageWidth;
28
28
29
29
return CropFitParams (cropSize, cropSizeToPaint, defaultScale);
30
30
case CustomImageFit .fillCropHeight:
31
31
final cropSize = screenHeight;
32
- final cropSizeToPaint = cropSize;
32
+ final cropSizeToPaint = cropSize * cropPercentage ;
33
33
final defaultScale = (cropSize * cropPercentage) / imageHeight;
34
34
35
35
return CropFitParams (cropSize, cropSizeToPaint, defaultScale);
You can’t perform that action at this time.
0 commit comments