Container(
alignment: Alignment.bottomCenter,
child: SvgPicture.asset(
img,
fit: BoxFit.contain,
),
Does fit: BoxFit.contain mean the picture would fill up the Container? Seems not working.
no! it sets the child's size to be as big as possible while still containing the child within the parent's box. It doesn't distort the child's aspect ratio.
ok, if you want the image to fill the container or the parent widget you can use BoxFit.Fill, this will help to fill the image to its parent widget but still there will be some problem with the picture ratio.
thank you
I do want to keep the aspect ratio.
For example, the Container widget is of Size(500, 400). The SvgPicture is rendered as Size(100, 200). What I want is for the image to be rendered as Size(200, 400).
Not sure what I'm doing wrong.
sorry I'm new here I downloaded your code to my computer can you please tell me error path or location where i need to fix. (the path or location of that error)
798 width: double.infinity,
799 height: double.infinity,
Seems this solves my issue. Are there APIs for this setting?
Oh I see. :rofl:
ok (: