Frame class

A Figma Frame

Inheritance
Implementers
Available Extensions
Annotations
  • @JsonSerializable()
  • @CopyWith()

Constructors

Frame({required String id, String? name, required bool visible, dynamic pluginData, dynamic sharedPluginData, List<Node?>? children, required bool locked, List<Paint>? fills, List<Paint>? strokes, num? strokeWeight, StrokeWeights? individualStrokeWeights, StrokeAlign? strokeAlign, double? cornerRadius, List<num>? rectangleCornerRadii, List<ExportSetting>? exportSettings, BlendMode? blendMode, bool? preserveRatio, double? layoutGrow, LayoutConstraint? constraints, LayoutAlign? layoutAlign, String? transitionNodeID, double? transitionDuration, EasingType? transitionEasing, double? opacity, SizeRectangle? absoluteBoundingBox, Vector2D? size, List<List<num>>? relativeTransform, bool? clipsContent, LayoutMode? layoutMode, PrimaryAxisAlignItems? primaryAxisAlignItems, CounterAxisAlignItems? counterAxisAlignItems, PrimaryAxisSizingMode? primaryAxisSizingMode, CounterAxisSizingMode? counterAxisSizingMode, double? paddingBottom, double? paddingLeft, double? paddingRight, double? paddingTop, num? horizontalPadding, num? verticalPadding, num? itemSpacing, List<LayoutGrid>? layoutGrids, OverflowDirection? overflowDirection, List<Effect>? effects, bool? isMask, bool? isMaskOutline, Map<StyleTypeKey, String>? styles})
Frame.fromJson(Map<String, dynamic> json)
factory

Properties

absoluteBoundingBox SizeRectangle?
Bounding box of the node in absolute space coordinates
final
blendMode BlendMode?
How this node blends with nodes behind it in the scene
final
children List<Node?>?
An array of nodes that are direct children of this node
final
clipsContent bool?
Whether or not this node clip content outside of its bounds
final
constraints LayoutConstraint?
Horizontal and vertical layout constraints for node
final
cornerRadius double?
Radius of each corner of the frame if a single radius is set for all corners
final
counterAxisAlignItems CounterAxisAlignItems?
Determines how the auto-layout frame’s children should be aligned in the counter axis direction. This property is only applicable for auto-layout frames.
final
counterAxisSizingMode CounterAxisSizingMode?
Whether the counter axis has a fixed length (determined by the user) or an automatic length (determined by the layout engine). This property is only applicable for auto-layout frames.
final
effects List<Effect>?
An array of effects attached to this node
final
exportSettings List<ExportSetting>?
An array of export settings representing images to export from node
final
fills List<Paint>?
An array of fill paints applied to the node
final
hashCode int
The hash code for this object.
no setterinherited
horizontalPadding num?
The horizontal padding between the borders of the frame and its children. This property is only applicable for auto-layout frames.
final
id String
A string uniquely identifying this node within the document.
finalinherited
individualStrokeWeights StrokeWeights?
The weight of strokes on the node per side, if they vary
final
isMask bool?
Does this node mask sibling nodes in front of it?
final
isMaskOutline bool?
Does this mask ignore fill style (like gradients) and effects?
final
itemSpacing num?
The distance between children of the frame. This property is only applicable for auto-layout frames.
final
layoutAlign LayoutAlign?
How the layer is aligned inside an auto-layout frame. This property is only provided for direct children of auto-layout frames.
final
layoutGrids List<LayoutGrid>?
An array of layout grids attached to this node. Group nodes do not have this attribute
final
layoutGrow double?
This property is applicable only for direct children of auto-layout frames, ignored otherwise. Determines whether a layer should stretch along the parent’s primary axis. A 0 corresponds to a fixed size and 1 corresponds to stretch
final
layoutMode LayoutMode?
Whether this layer uses auto-layout to position its children.
final
locked bool
If true, layer is locked and cannot be edited
final
name String?
The name given to the node by the user in the tool.
finalinherited
opacity double?
Opacity of the node
final
overflowDirection OverflowDirection?
Defines the scrolling behavior of the frame, if there exist contents outside of the frame boundaries. The frame can either scroll vertically, horizontally, or in both directions to the extents of the content contained within it. This behavior can be observed in a prototype.
final
paddingBottom double?
The padding betweeen the bottom border of the frame and its children. This property is only applicable for auto-layout frames.
final
paddingLeft double?
The padding betweeen the left border of the frame and its children. This property is only applicable for auto-layout frames.
final
paddingRight double?
The padding betweeen the right border of the frame and its children. This property is only applicable for auto-layout frames.
final
paddingTop double?
The padding betweeen the top border of the frame and its children. This property is only applicable for auto-layout frames.
final
pluginData → dynamic
Data written by plugins that is visible only to the plugin that wrote it. Requires the pluginData to include the ID of the plugin.
finalinherited
preserveRatio bool?
Keep height and width constrained to same ratio
final
primaryAxisAlignItems PrimaryAxisAlignItems?
Determines how the auto-layout frame’s children should be aligned in the primary axis direction. This property is only applicable for auto-layout frames.
final
primaryAxisSizingMode PrimaryAxisSizingMode?
Whether the primary axis has a fixed length (determined by the user) or an automatic length (determined by the layout engine). This property is only applicable for auto-layout frames.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
rectangleCornerRadii List<num>?
Array of length 4 of the radius of each corner of the frame, starting in the top left and proceeding clockwise
final
relativeTransform List<List<num>>?
The top two rows of a matrix that represents the 2D transform of this node relative to its parent. The bottom row of the matrix is implicitly always (0, 0, 1). Use to transform coordinates in geometry. Only present if geometry=paths is passed
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sharedPluginData → dynamic
Data written by plugins that is visible to all plugins. Requires the pluginData parameter to include the string "shared".
finalinherited
size Vector2D?
Width and height of element. This is different from the width and height of the bounding box in that the absolute bounding box represents the element after scaling and rotation. Only present if geometry=paths is passed
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
strokeAlign StrokeAlign?
Position of stroke relative to vector outline, as a string enum
final
strokes List<Paint>?
An array of stroke paints applied to the node
final
strokeWeight num?
The weight of strokes on the node
final
styles Map<StyleTypeKey, String>?
A mapping of a StyleType to style ID (see Style) of styles present on this node. The style ID can be used to look up more information about the style in the top-level styles field.
final
transitionDuration double?
The duration of the prototyping transition on this node (in milliseconds)
final
transitionEasing EasingType?
The easing curve used in the prototyping transition on this node
final
transitionNodeID String?
Node ID of node to transition to in prototyping
final
type String?
The type of the node
finalinherited
verticalPadding num?
The vertical padding between the borders of the frame and its children. This property is only applicable for auto-layout frames.
final
visible bool
Whether or not the node is visible on the canvas.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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