figma library

Renders the IR as a Figma design document (design.json).

FigmaRenderer maps the IR to Figma Plugin API names and enums (layoutMode, layoutSizingHorizontal, variables, text and effect styles, components). The Flutter2Figma Figma plugin imports the result.

final design = FigmaRenderer().render(ir);
File('design.json').writeAsStringSync(jsonEncode(design));

Classes

FigmaRenderer
Renders IR into design.json: a tree of nodes whose properties use Figma Plugin API names and enums, so the plugin can apply them almost verbatim.

Constants

designFormat → const String
designVersion → const int
minPluginVersion → const String
The first Figma plugin release that reads designVersion. Bump both together (see doc/releasing.md): the export tells people which plugin they need.

Functions

figmaFontStyle(int weight, {bool italic = false}) → String
Figma font style name for a CSS-style weight, e.g. 700 → Bold.