Flutter_svg: SVG with nested <svg> elements isn't rendering

Created on 7 Mar 2019  路  6Comments  路  Source: dnfield/flutter_svg

Hi,

I have an SVG that is only partially rendering - I'm not sure why. In this case, only the feet of the monkey in the image are rendering with flutter_svg 0.12.0

Problematic SVG:
https://www.dropbox.com/s/f5krj9osezwp0sg/test.svg?dl=0

Thanks for the help!

Most helpful comment

I'll keep this open to track nested <svg> elements. Right now it's lower priority for me because I'm not sure how many people really want it compared to, say, filter effects. But If it gets enough upvotes here I'll rethink that :)

All 6 comments

Can you just paste the content of the SVG here directly? I can't seem to access that link properly.

Oh sorry, it's quite large so better to not paste it I think.

Try this one:
https://cdn.discordapp.com/attachments/490551255727603733/553284336527605770/test.svg

Your SVG has multiple nested SVG elements. that's not supported at this time.

You could probably get away with just changing all the nested <svg> tags to <g>s. None of them are actually changing the viewBox.

Ah, no you can't just do a new , but unfortunately this kind of SVG isn't supported. I haven't seen a lot of demand for it, but if you want to create a PR to make it work I'd review it.

Thanks for the response, I was able to change the format of the SVGs as you suggested and they work without nested elements now.

I'll keep this open to track nested <svg> elements. Right now it's lower priority for me because I'm not sure how many people really want it compared to, say, filter effects. But If it gets enough upvotes here I'll rethink that :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barak-innov picture barak-innov  路  4Comments

ChristianKleineidam picture ChristianKleineidam  路  5Comments

alectogeek picture alectogeek  路  5Comments

Skyost picture Skyost  路  3Comments

joaorpalma picture joaorpalma  路  4Comments