Section class

Inheritance
Mixed-in types
Available extensions
Annotations
  • @JsonSerializable.new(explicitToJson: true)
  • @CopyWith.new()
  • @immutable

Constructors

Section({required String id, required String name, bool visible = true, bool locked = false, required ScrollBehavior scrollBehavior, num rotation = 0, Map<String, String> componentPropertyReferences = const {}, Object? pluginData, Object? sharedPluginData, LayerTraitVariables boundVariables = const LayerTraitVariables(), Map<String, String> explicitVariableModes = const {}, Map<String, PaintOverride?> fillOverrideTable = const {}, List<Path> fillGeometry = const [], List<Path> strokeGeometry = const [], StrokeCap strokeCap = StrokeCap.none, num strokeMiterAngle = 28.96, required List<Paint> fills, Map<String, String> styles = const {}, List<Paint> strokes = const [], num strokeWeight = 1, StrokeAlign? strokeAlign, StrokeJoin strokeJoin = StrokeJoin.miter, List<num> strokeDashes = const [], required List<SubCanvasNode> children, Rectangle? absoluteBoundingBox, Rectangle? absoluteRenderBounds, bool preserveRatio = false, LayoutConstraint? constraints, Transform? relativeTransform, Vector? size, LayoutAlign? layoutAlign, LayoutGrow layoutGrow = LayoutGrow.fixed, LayoutPositioning layoutPositioning = LayoutPositioning.auto, num minWidth = 0, num maxWidth = 0, num minHeight = 0, num maxHeight = 0, LayoutSizing? layoutSizingHorizontal, LayoutSizing? layoutSizingVertical, num? gridRowCount, num? gridColumnCount, num gridRowGap = 0, num gridColumnGap = 0, String? gridColumnsSizing, String? gridRowsSizing, GridChildAlign? gridChildHorizontalAlign, GridChildAlign? gridChildVerticalAlign, num gridRowSpan = 1, num gridColumnSpan = 1, num gridRowAnchorIndex = 0, num gridColumnAnchorIndex = 0, DevStatus? devStatus, required bool sectionContentsHidden})
const
Section.fromJson(Map<String, Object?> json)
factory

Properties

absoluteBoundingBox Rectangle?
Bounding box of the node in absolute space coordinates.
final
absoluteRenderBounds Rectangle?
The actual bounds of a node accounting for drop shadows, thick strokes, and anything else that may fall outside the node's regular bounding box defined in x, y, width, and height.
final
boundVariables LayerTraitVariables
A mapping of field to the variables applied to this field.
final
children List<SubCanvasNode>
An array of nodes that are direct children of this node.
final
componentPropertyReferences Map<String, String>
A mapping of a layer's property to component property name of component properties attached to this node.
final
constraints LayoutConstraint?
Horizontal and vertical layout constraints for node.
final
copyWith → _$SectionCWProxy

Available on Section, provided by the $SectionCopyWith extension

Returns a callable class used to build a new instance with modified fields. Example: instanceOfSection.copyWith(...) or instanceOfSection.copyWith.fieldName(...).
no setter
devStatus DevStatus?
Represents whether or not a node has a particular handoff (or dev) status applied to it.
final
explicitVariableModes Map<String, String>
A mapping of variable collection ID to mode ID representing the explicitly set modes for this node.
final
fillGeometry List<Path>
Only specified if parameter geometry=paths is used.
final
fillOverrideTable Map<String, PaintOverride?>
Map from ID to PaintOverride for looking up fill overrides.
final
fills List<Paint>
An array of fill paints applied to the node.
final
gridChildHorizontalAlign GridChildAlign?
Determines how a GRID frame's child should be aligned in the horizontal direction within its grid area.
final
gridChildVerticalAlign GridChildAlign?
Determines how a GRID frame's child should be aligned in the vertical direction within its grid area.
final
gridColumnAnchorIndex num
The index of the column that a GRID frame's child should be anchored to.
final
gridColumnCount num?
The number of columns in the grid layout.
final
gridColumnGap num
The distance between columns in the grid layout.
final
gridColumnSpan num
The number of columns that a GRID frame's child should span.
final
gridColumnsSizing String?
The string for the CSS grid-template-columns property.
final
gridRowAnchorIndex num
The index of the row that a GRID frame's child should be anchored to.
final
gridRowCount num?
The number of rows in the grid layout.
final
gridRowGap num
The distance between rows in the grid layout.
final
gridRowSpan num
The number of rows that a GRID frame's child should span.
final
gridRowsSizing String?
The string for the CSS grid-template-rows property.
final
hashCode int
The hash code for this object.
no setterinherited
id String
A string uniquely identifying this node within the document.
final
layoutAlign LayoutAlign?
Determines if the layer should stretch along the parent's counter axis.
final
layoutGrow LayoutGrow
This property is applicable only for direct children of auto-layout frames, ignored otherwise.
final
layoutPositioning LayoutPositioning
Determines whether a layer's size and position should be determined by auto-layout settings or manually adjustable.
final
layoutSizingHorizontal LayoutSizing?
The horizontal sizing setting on this auto-layout frame or frame child.
final
layoutSizingVertical LayoutSizing?
The vertical sizing setting on this auto-layout frame or frame child.
final
locked bool
If true, layer is locked and cannot be edited.
final
maxHeight num
The maximum height of the frame.
final
maxWidth num
The maximum width of the frame.
final
minHeight num
The minimum height of the frame.
final
minWidth num
The minimum width of the frame.
final
name String
The name given to the node by the user in the tool.
final
pluginData Object?
Data written by plugins that is visible only to the plugin that wrote it.
final
preserveRatio bool
Keep height and width constrained to same ratio.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
relativeTransform Transform?
The top two rows of a matrix that represents the 2D transform of this node relative to its parent.
final
rotation num
The rotation of the node, if not 0.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehavior ScrollBehavior
How layer should be treated when the frame is resized.
final
sectionContentsHidden bool
Whether the contents of the section are visible.
final
sharedPluginData Object?
Data written by plugins that is visible to all plugins.
final
size Vector?
Width and height of element.
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
strokeCap StrokeCap
A string enum describing the end caps of vector paths.
final
strokeDashes List<num>
An array of floating point numbers describing the pattern of dash length and gap lengths that the vector stroke will use when drawn.
final
strokeGeometry List<Path>
Only specified if parameter geometry=paths is used.
final
strokeJoin StrokeJoin
A string enum with value of "MITER", "BEVEL", or "ROUND", describing how corners in vector paths are rendered.
final
strokeMiterAngle num
Only valid if strokeJoin is "MITER".
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<String, String>
A mapping of a StyleType to style ID (see Style) of styles present on this node.
final
type NodeType
The type of this node, represented by the string literal "SECTION".
no setteroverride
visible bool
Whether or not the node is visible on the canvas.
final

Methods

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

Operators

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