FigmaLayoutAdapter class

An adapter that provides layout capabilities for Figma nodes. This adapter abstracts the layout properties of various Figma node types that can act as containers (Frame, Component, Instance, etc.).

Mixed-in types

Constructors

FigmaLayoutAdapter(Node node)

Properties

children List<Node?>?
The children of the container
no setter
counterAxisAlignItems → CounterAxisAlignItems?
The counter axis alignment of children
no setter
counterAxisSizingMode → CounterAxisSizingMode?
Counter axis sizing mode
no setter
hashCode int
The hash code for this object.
no setterinherited
isWrapLayout bool
no setter
itemSpacing double
The spacing between children
no setter
layoutMode → LayoutMode?
The layout mode (horizontal/vertical) of the node
no setter
layoutWrap → LayoutWrap?
no setter
mainAxisSize MainAxisSize
Creates appropriate main axis size for the layout
no setter
node → Node
final
padding EdgeInsets
The padding of the container
no setter
primaryAxisAlignItems → PrimaryAxisAlignItems?
The primary axis alignment of children
no setter
primaryAxisSizingMode → PrimaryAxisSizingMode?
Primary axis sizing mode
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldFillInCounterAxis bool
Whether the container should fill available space in the counter axis
no setter
shouldFillInPrimaryAxis bool
Whether the container should fill available space in the primary axis
no setter
shouldHugContentInCounterAxis bool
Whether the container should hug its content in the counter axis
no setter
shouldHugContentInPrimaryAxis bool
Whether the container should hug its content in the primary axis
no setter
size Size?
The size constraints of the container
no setter
supportsLayout bool
Whether the node supports layout capabilities
no setter

Methods

clearCache() → void
inherited
getCached<T>(String key, T compute()) → T
inherited
getCacheId() String
override
getCrossAxisAlignment() CrossAxisAlignment
Creates appropriate cross axis alignment for the layout
getMainAxisAlignment() MainAxisAlignment
Creates appropriate main axis alignment for the layout
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validateLayout() → void
Validates that the node supports layout capabilities and throws a descriptive error if it doesn't.

Operators

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