FigmaApiService class

A service for interacting with the Figma API.

This service provides methods to:

  • Fetch nodes and components from Figma files
  • Export images in different formats
  • Fetch and manage variables and variable collections

All methods require a valid Figma access token and file ID.

Constructors

FigmaApiService(String _figmaToken, String _fileId, {Client? client})
Creates a new FigmaApiService instance.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

exportImages(List<String> vectorIds, {bool exportAsSvg = false}) Future<Map<String, String>>
Exports images for specified vector nodes.
fetchNode(String nodeId) Future<Map<String, dynamic>>
Fetches a specific node from the Figma file.
fetchTypedVariables() Future<Map<String, FigmaVariable>>
Fetches and parses variables into strongly-typed objects.
fetchVariableCollections() Future<Map<String, FigmaVariableCollection>>
Fetches and parses variable collections into strongly-typed objects.
fetchVariables() Future<Map<String, dynamic>>
Fetches all variables from the Figma file.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited