XD to Flutter plugin in XD is a powerful, easy-to-use tool to export your stunning Adobe XD designs into clean, functional code for Flutter. You can export reusable widgets or even whole views, as well as copy the code for specific visual components in your design. You have the option to export an artboard, a single drawing, or a component.
Create a new Flutter project with the project name or choose the existing project that you want to load the content into.
Add the adobe_xd package reference in pubspec.yaml
FLUTTER PROJECT
CODE PATH
IMAGE PATH
WIDGET NAME PREFIX ( optional )
SETTINGS
EXPORT ASSETS
[Ico/menu-light] Master component could not be found.(x3)
[status bar/dark] Master component could not be found.(x14)
[icons/dark/back] Master component could not be found.(x10)
Warnings:
Could not find flutter/assets entry in pubspec.yaml for:assets/images/.
[Total Generation]Image does not have a Flutter image name.(x10)
Could not find flutter/fonts entry in pubspec.yaml for:SF UI Text G1.
[Group 156]Transition type not supported:'autoAnimate'.
[Bar]Only inner strokes are supported on rectangles and ellipses.(x90)
[Ellipse 2]Object blur is not supported.(x4)
[Component 27 – 4]Unsupported trigger 'drag'. Only tap is supported.
[Group 157]Transition type not supported:'autoAnimate'.
[Left swipe]Transition type not supported:'autoAnimate'.(x5)
[Right swipe]Transition type not supported:'autoAnimate'.(x5)
[Path 13]Shadows are not supported on shapes.(x4)
[Path 15]Shadows are not supported on shapes.(x4)
[Group 158]Transition type not supported:'autoAnimate'.
[Group 155]Transition type not supported:'autoAnimate'.
Error: “Could not find the flutter/fonts entry in pubspec.yaml for: SF UI Text G1.” & “Could not find flutter/assets entry in pubspec.yaml for: assets/images/.”
Solution: You have to mention all the font family and image assets in the pubspec.yml file.
Error: Master component could not be found.
Solution: “We have ungrouped all the components”, We have used components in the design, for every child component we have one master component, As per the documentation you can use components in XD to Flutter plug-in, but we have faced the issue where we are using both master component and child components but we were ending us by the error shown above. (Sometimes components works sometimes don’t).
Error: “Transition type Not supported - ‘autoAnimate’“ & “Unsupported trigger ‘Drag’“
Solution: We have taken out this transition from the prototype and replaced it with a straightforward transition effect.
Error: “Object blur is not supported“ & “Shadows are not supported on shapes“
Solution: These elements were converted from SVG to High-resolution PNGs and then included in the design.
Error: Only inner strokes are supported on rectangles & ellipses.
Solution: We have used gradients in the inner stroke color for the active bar, We have transformed the bar from outline to flatten object (It will look the same but inner properties are different).
Error: Outlined arrows don’t show properly after exporting the design to code.
Back Arrow
Slider Arrow
Solution: We have transformed the icons from outline stroke to vector (Flatten image).