FigmaClient class

A client for interacting with the Figma API.

Constructors

FigmaClient(String accessToken, {String apiVersion = 'v1', bool useHttp2 = !kIsWeb, bool useOAuth = false})

Properties

accessToken String
The personal access token for the Figma Account to be used Or the OAuth token, if useOAuth is true.
final
apiVersion String
Specifies the Figma API version to be used. Should only be specified if package is not updated with a new API release.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useHttp2 bool
Use HTTP2 sockets for interacting with API.
final
useOAuth bool
final

Methods

authenticatedGet(String url) Future<Map<String, dynamic>>
Does an authenticated GET request towards the Figma API.
getFileNodes(String key, FigmaQuery query) Future<NodesResponse>
Retrieves the file nodes specified.
getFileStyles(String key, [FigmaQuery? query]) Future<StylesResponse>
Retrieves all published styles from the Figma file specified by key.
getLocalVariables(String fileId) Future<VariablesResponseDto>
Retrieves the published local variables from the Figma file specified by fileId.
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