FigmaTextAdapter class
An adapter that provides text capabilities for Figma nodes. This adapter handles both direct text nodes and components that can behave as text.
Constructors
- FigmaTextAdapter(Node node)
-
const
Properties
-
effects
→ List<
Effect> ? -
The visual effects applied to the text
no setter
-
fills
→ List<
Paint> ? -
The fill properties affecting text color and gradients
no setter
- fontSize → double?
-
The font size of the text
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isItalic → bool
-
Whether the text is italic
no setter
- letterSpacing → double?
-
The letter spacing of the text
no setter
- lineHeight → double?
-
The line height of the text
no setter
- node → Node
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size?
-
The size of the text box
no setter
-
strokes
→ List<
Paint> ? -
The stroke properties for outlined text
no setter
- strokeWeight → double?
-
The stroke weight for outlined text
no setter
- style → TypeStyle?
-
The text style properties
no setter
- supportsText → bool
-
Whether the node supports text capabilities
no setter
Methods
-
createTextStyle(
) → TextStyle? - Creates a Flutter TextStyle from the Figma text properties
-
getFontWeight(
) → FontWeight - The font weight of the text
-
getTextAlign(
) → TextAlign - The text alignment
-
getTextDecoration(
) → TextDecoration? - The text decoration (underline, strikethrough)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateText(
) → void - Validates that the node supports text capabilities and throws a descriptive error if it doesn't.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited