When i am exporting svg images from figma, these images in flutter are not rendering and throwing error ? Even using flutter_svg package.
Asked
Active
Viewed 1,169 times
2 Answers
1
You will need to move your <defs>
statements to the beginning of the file instead. Save your svg's as normally through Figma and open it with your text editor of choice. Find the <defs>
</defs>
statements and move them up as the first children of the <svg>
element.
It is described in further detail here by the author of the flutter_svg package.
If everything else fails and you have a particular annoying svg, I've had success with using various svg optimizer tools found online.

dinjooh
- 66
- 2
0
Try this package: jovial_svg. If it doesn't help, you will need to edit your svg (just deleting def
s not always helps). Or to write your own render for it.

Abigotado
- 75
- 6