You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When FlutterSvg is used with contain or fitWidth visually the svg is correctly fitted like the option but the container does not keep the aspect ratio of the svg.
For example if the SvgPicture is contained in a Container with a background the background is visible outside of the svg boundary.
Here is an illustration:
In this example my svg is 768x821 and I it is contained in a 300 width container as we can see the svg in the center look correct but the container is still 821 pixel tall which makes my background overflow above and bellow the svg. Would it be nicer if the container resized the same way ?
When FlutterSvg is used with
contain
orfitWidth
visually the svg is correctly fitted like the option but the container does not keep the aspect ratio of the svg.For example if the SvgPicture is contained in a Container with a background the background is visible outside of the svg boundary.
Here is an illustration:
Code:
In this example my svg is 768x821 and I it is contained in a 300 width container as we can see the svg in the center look correct but the container is still 821 pixel tall which makes my background overflow above and bellow the svg. Would it be nicer if the container resized the same way ?
I have found 2 workaround:
In this one you have to manually fill the pixel size of the image.
This one works fine but I suppose you already use FittedBox in your code that is weird to use 2 nested Fittedbox Right ?
The text was updated successfully, but these errors were encountered: