Node class sealed

Runtime scene-graph node (hierarchical TRS).

Notes:

  • All nodes (including groups) have a real Transform2D.
  • Group nodes structurally own children (no groupId).
  • IDs are intended to be globally unique within the document.
  • Optional user-facing display names live in name.
  • Optional higher-level group semantics live in GroupNode.behavior. Core runtime does not interpret product/domain behavior types directly.
  • Sibling order is paint/stack order: earlier siblings paint behind later siblings.
Available extensions
Annotations
  • @Freezed.new(unionKey: 'runtimeType')

Constructors

Node.fromJson(Map<String, dynamic> json)
factory
Node.group({required ElementId id, String? name, @Default.new(false) bool hidden, @Default.new(Transform2D()) Transform2D xf, GroupBehaviorRef? behavior, @Default.new(<Node>[]) List<Node> children})
const
factory
Node.icon({required ElementId id, String? name, @Default.new(false) bool hidden, @Default.new(Transform2D()) Transform2D xf, required CanvasIconData data, String? role})
const
factory
Node.image({required ElementId id, String? name, @Default.new(false) bool hidden, @Default.new(Transform2D()) Transform2D xf, required ImageData data, String? role})
const
factory
Node.path({required ElementId id, String? name, @Default.new(false) bool hidden, @Default.new(Transform2D()) Transform2D xf, required PathData data, String? role})
const
factory
Node.text({required ElementId id, String? name, @Default.new(false) bool hidden, @Default.new(Transform2D()) Transform2D xf, required TextData data, String? role})
const
factory

Properties

childrenOrEmpty → List<Node>

Available on Node, provided by the NodeFields extension

no setter
copyWith → $NodeCopyWith<Node>
Create a copy of Node with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hidden → bool
no setterinherited
hidden → bool

Available on Node, provided by the NodeFields extension

no setter
id → String
no setterinherited
id → String

Available on Node, provided by the NodeFields extension

no setter
isGroup → bool

Available on Node, provided by the NodeFields extension

no setter
name → CanvasAssetId?
no setterinherited
name → CanvasAssetId?

Available on Node, provided by the NodeFields extension

no setter
role → CanvasAssetId?

Available on Node, provided by the NodeFields extension

no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
xf → Transform2D
no setterinherited
xf → Transform2D

Available on Node, provided by the NodeFields extension

no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this Node to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
withHidden(bool hidden) → Node

Available on Node, provided by the NodeEditingX extension

withName(String? name) → Node

Available on Node, provided by the NodeEditingX extension

withXf(Transform2D xf) → Node

Available on Node, provided by the NodeEditingX extension

Operators

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