Export CustomPainter code in addition to SVG
Hi
Whenever i create a shape, XD is giving me dart code with Container with decoration option or SvgPicture. I am looking for the code in CustomPainter.
How do i force XD to export the widget with custompainter instead of SvgPicture?
Right now it only generates SVG. The reason for this is that XD only exposes custom shapes as SVG path data, which we are then able to tweak slightly to work with SvgPicture. This means that to support CustomPainter, we'd need to parse the SVG path string, and re-write it as painter commands. Not impossible by any means, but it's a fairly heavy lift, and could be fragile if Adobe changes things in the path output.
Could you share the specific use cases you have in mind for this feature? It would help us to assign an appropriate priority.
@Isidoria - no updates. XD still only exposes paths as a SVG path data string, and no one has provided any use cases (per my previous comment) to inform priority on why we would pre-parse that string into CustomPainter calls.