Hello! I am currently building an app where I need to display product images.
As the faded background does not fit our design, I used dimColor: Colors.white to remove it.
After doing so, I noticed that Crop renders width*1 pixels either at the top or the bottom of the widget. This is really noticable with dimColor set to white.
This mostly occures when the image does not have the same aspect ratio as the space in which the widget is rendered.
In the example image below, the source image is a Portrait (dimensions 2592*3840 pixels), and needs to be shown in space no bigger then 300x400.
Very visible example with dim color white:
Same can be seen with default dim:
Here is the code that created that widget:
I have tried to understand how Crop works to fix it myself, but I couldnt find the cause.
Hello! I am currently building an app where I need to display product images.
As the faded background does not fit our design, I used
dimColor: Colors.white
to remove it.After doing so, I noticed that Crop renders width*1 pixels either at the top or the bottom of the widget. This is really noticable with dimColor set to white.
This mostly occures when the image does not have the same aspect ratio as the space in which the widget is rendered.
In the example image below, the source image is a Portrait (dimensions 2592*3840 pixels), and needs to be shown in space no bigger then 300x400.
Very visible example with dim color white:
Same can be seen with default dim:
Here is the code that created that widget:
I have tried to understand how Crop works to fix it myself, but I couldnt find the cause.