NodeGroup class
Represents a group of nodes on the canvas.
A node group visually binds related nodes together with a rounded rectangle background and an optional label. Groups can be dragged (moving all member nodes), selected, and serialized to JSON.
Constructors
Properties
- color → Color?
-
Optional custom color for this group.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for this group.
final
- isSelected → bool
-
Whether this group is currently selected.
final
-
metadata
→ Map<
String, dynamic> ? -
Optional custom metadata associated with this group.
final
- name → String
-
Display label for this group.
final
-
nodeIds
→ Set<
String> -
The IDs of nodes belonging to this group.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
bounds(
List< CanvasNode> nodes, {double padding = 20.0, double labelPadding = 28.0}) → Rect? - Calculates the bounding rectangle of this group based on its member nodes.
-
copyWith(
{String? id, String? name, Set< String> ? nodeIds, Color? color, bool? isSelected, Map<String, dynamic> ? metadata}) → NodeGroup - Creates a copy of this group with optional new values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this group to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited