FigmaVariable class
Represents a Figma variable with its properties and values.
This class encapsulates a variable from Figma's design system, including its identifier, name, type, and values for different modes (e.g., light/dark).
Constructors
-
FigmaVariable({required String id, required String name, required String resolvedType, required Map<
String, dynamic> valuesByMode, required String variableCollectionId}) - Creates a new FigmaVariable instance.
-
FigmaVariable.fromJson(Map<
String, dynamic> json) -
Creates a FigmaVariable from a JSON map.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The unique identifier of the variable in Figma.
final
- name → String
-
The human-readable name of the variable.
final
- resolvedType → String
-
The resolved type of the variable.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
valuesByMode
→ Map<
String, dynamic> -
A map of values for different modes (e.g., light/dark theme).
final
- variableCollectionId → String
-
The ID of the variable collection this variable belongs to.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the variable to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited